|
在ipython3中使用monkey.patch_all()的时候弹出以下提示:
The history saving thread hit an unexpected error (LoopExit('This operation would block forever', <Hub at 0x7fb00824a9c8 epoll pending=0 ref=0 fileno=6>)).History will not be written to the database.
然后在pycharm中使用monkey.patch_all()时程序在执行到该句直接报错,弹出异常类型莫名其妙:
Traceback (most recent call last):
File "/home/itcast/Desktop/1/生成器/demo5打补丁.py", line 5, in <module>
monkey.patch_all()
File "/usr/local/lib/python3.5/dist-packages/gevent/monkey.py", line 611, in patch_all
patch_thread(Event=Event, _warnings=_warnings)
File "/usr/local/lib/python3.5/dist-packages/gevent/monkey.py", line 338, in patch_thread
patch_module('thread')
File "/usr/local/lib/python3.5/dist-packages/gevent/monkey.py", line 152, in patch_module
gevent_module = getattr(__import__('gevent.' + name), name)
File "/usr/local/lib/python3.5/dist-packages/gevent/thread.py", line 41, in <module>
from gevent.local import local as _local
File "/usr/local/lib/python3.5/dist-packages/gevent/local.py", line 138, in <module>
from copy import copy
ImportError: cannot import name 'copy'
|
|