Working with 10.2.2, 64bit geoprocessing arcpy installation. Getting this error from arcpy.CalculateField_management() command.
From Spyder IDE in an ipython console, I get the error:
[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
File "C:\Users\Nick\appdata\local\enthought\canopy\user\lib\site-packages\IPython\kernel\zmq\ipkernel.py", line 245, in dispatch_shell
handler(stream, idents, msg)
File "C:\Users\Nick\appdata\local\enthought\canopy\user\lib\site-packages\IPython\kernel\zmq\ipkernel.py", line 400, in execute_request
reply_content.update(shell._showtraceback(etype, evalue, tb_list))
File "C:\Users\Nick\appdata\local\enthought\canopy\user\lib\site-packages\IPython\kernel\zmq\zmqshell.py", line 501, in _showtraceback
sys.stdout.flush()
AttributeError: 'geoprocessing sys.stdout object' object has no attribute 'flush'
It doesn't seem to have anything to do with the specifics of the command, and I can execute most other arcpy commands without problem.
Suggestions?
Here's the code I was running to get up to this (although I've tried this with different targets and different expressions -- it just seems to be the command, not the specifics):
ap.CalculateField_management(in_table = thiessens, field = 'primarySiteID',
expression = "!SITEID!",
expression_type = 'PYTHON')
At this point I'm pretty sure it's an incompatibility with iPython that only appears in the context of some of the field-editing commands (since I use iPython all the time and usually without issue...)
Pretty sure it's iPython -- have the same issue with a different ipython install on a different computer, so I don't think it's Spyder or that specific installation.