I get this error with multiprocessing when looping a simple range.
Process PoolWorker-37:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 249, in _bootstrap
sys.stdin.close()
AttributeError: StdIn instance has no attribute 'close'
The code
pool = multiprocessing.Pool(processes=3)
pool.map(get_info, range(20000,20010), 1)
pool.close()
pool.join()
the first issue was by eclipse altering the environment, but now I get this error
PicklingError: Can't pickle <type 'cStringIO.StringO'>: attribute lookup cStringIO.StringO failed
This error is thrown if you are running in PyCharm console. I used the system console and all ran ok.
In PyCharm 4.5 the solution for me was to remove "Show command line afterwards" checkbox in server Run/Debug configuration for python file (which is not even documented in PyCharm manual)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With