Select to view content in your preferred language

Mapping and Charting 10.3.1 Breaks Python, beware!

3384
3
07-17-2015 06:53 AM
ThomasColson
MVP Frequent Contributor

Mapping and Charting 10.3.1 Breaks Python, beware!

On a freshly-reimaged OS install, with a fresh install of Arc 10.3.1 and Mapping and Charting 10.3.1 with all features enabled, including Maritime Charting, you will no longer be able to import arcpy.

Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import arcpy


Warning (from warnings module):
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\__init__.py", line 157
    warnings.warn("Failed importing {0}".format(filename))
UserWarning: Failed importing C:\Program Files (x86)\ArcGIS\MaritimeCharting\Desktop10.3\ArcToolbox\Toolboxes\NauticalRound.py

Further investigation reveals the following is failing:

from ctypes import cdll, CDLL, CFUNCTYPE, c_int, c_double, c_wchar_p


class CFunctions() :
  _dll = CDLL('SymbolizeRepsLib.dll')
  prototype = CFUNCTYPE(c_int, c_int, c_double, c_wchar_p, c_wchar_p, c_wchar_p)
  paramFlags = (1,),(1,),(1,),(1,),(1,),
                      
  _round = prototype(('PLTSRound', cdll.SymbolizeRepsLib), paramFlags)
  def round2(self, rr, depth):
  integerString =  create_unicode_buffer(32)
  fractionalString =  create_unicode_buffer(32)
  valueString =  create_unicode_buffer(32)
  rc = self._round(c_int(rr), c_double(depth), integerString, fractionalString, valueString)
  return (str(integerString.value), str(fractionalString.value), str(valueString.value))

Which results in:

Traceback (most recent call last):
  File "C:\Program Files (x86)\ArcGIS\MaritimeCharting\Desktop10.3\ArcToolbox\Toolboxes\NauticalRound.py", line 3, in <module>
    class CFunctions() :
  File "C:\Program Files (x86)\ArcGIS\MaritimeCharting\Desktop10.3\ArcToolbox\Toolboxes\NauticalRound.py", line 4, in CFunctions
    _dll = CDLL('SymbolizeRepsLib.dll')
  File "C:\Python27\ArcGIS10.3\lib\ctypes\__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

My suspicion is that the attempt to call SymbolizeRepsLib.dll is failing, as that requires an elevated account, which, following recent events, is not a privilege that many ArcGIS users now have when using Mapping and Charting. 

3 Replies
JoshuaBixby
MVP Esteemed Contributor

Thanks for the heads up.  In some respects, I am not surprised.  My organization historically had problems with PLTS breaking built-in ArcGIS Desktop functionality, to the point where 2 different sets of ArcGIS Desktop Citrix blades had to be provisioned and managed for years.  For that and other reasons, the organization has been weaning employees off of Mapping and Charting extensions unless they are absolutely necessary.

0 Kudos
DanHopkins
Esri Contributor

Hi Thomas,

My name is Dan Hopkins. I work for the Mapping and Charting Solutions (MCS) Team. A co-worker brought this issue to my attention only recently. My response is not timely. To improve our response time, there are places in Geonet that we monitor daily. If you have questions or encounter issues with MCS, could you post to places that we monitor. The link below is a good place to start:

Mapping and Charting

On Windows 7 64-bit machine running Esri MCS 10.3.1 with all solutions installed, I have logged in with a non-admin user and I have executed successfully import arcpy in a third-party IDE for the following releases:

- Release Build 4523

- Patch1 Build 4715

- Patch2 Build 4883

- Patch3 Build 5009

- Patch4 Build 5071

On the same day you posted to Geonet, your organization contacted Esri Technical Support creating technical support Case #01663677. On 7/27/2015, in a phone conversation with a Support Analyst, you stated that the issue appears to have been fixed by your IT department and that it will take about a week to test all affected machines. The next day, you sent an email stating that you were "still testing the python issue, it came, and then went again, following another Windows Update". After 7/28/2015, there is no further correspondence between you and Esri and Case #01663677 was closed.

Based on my testing this week and the correspondence for Case #01663677, Mapping and Charting Solutions (MCS) 10.3.1 does not break python. In case other users encounter the same issue, would you be able tell the Geonet community how your organization identified and addressed the issue? Is there anything Esri can do to help with this issue?

Regards,

Dan

0 Kudos
ThomasColson
MVP Frequent Contributor

I believe that the solution was to grant local users full control on the ArcGIS, MCS,  and Python install directories, a solution that has solved numerous ArcMap problems. Different organizations have different IT security policies, so a non-adm ArcMap user on an a "normal" computer would likely have a far different experience than a non-adm ArcMap user on tightly-locked down workstation, with everything else (hardware, OS, software installed) being the same.

0 Kudos