Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

arcpy, CalculateField: 'geoprocessing sys.stdout object' object has no attribute 'flush'

$
0
0

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:UsersNickappdatalocalenthoughtcanopyuserlibsite-packagesIPythonkernelzmqipkernel.py", line 245, in dispatch_shell
    handler(stream, idents, msg)
  File "C:UsersNickappdatalocalenthoughtcanopyuserlibsite-packagesIPythonkernelzmqipkernel.py", line 400, in execute_request
    reply_content.update(shell._showtraceback(etype, evalue, tb_list))
  File "C:UsersNickappdatalocalenthoughtcanopyuserlibsite-packagesIPythonkernelzmqzmqshell.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')

Update: 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…)

* Update 2: * 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.


Viewing all articles
Browse latest Browse all 767

Trending Articles