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.pyFurther 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 foundMy 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.