Python3 RuntimeError: cannot release un-acquired lock
怪我咯
怪我咯 2017-04-18 09:49:35
0
1
1033

当给爬虫加上多线程的时候报错,由于刚学python不久,不理解哪里出现了锁问题

/usr/local/lib/python3.5/dist-packages/gevent/monkey.py:395: RuntimeWarning: Monkey-patching not on the main thread; threading.main_thread().join() will hang from a greenlet
  _warnings)
Traceback (most recent call last):
  File "/home/codebug/software/pycharm-2016.2.3/helpers/pydev/pydevd.py", line 1580, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/home/codebug/software/pycharm-2016.2.3/helpers/pydev/pydevd.py", line 964, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/home/codebug/software/pycharm-2016.2.3/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/codebug/python workspace/HProxy/HProxy.py", line 3, in <module>
    from spider.Spider import Spider
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 171, in __exit__
  File "<frozen importlib._bootstrap>", line 123, in release
RuntimeError: cannot release un-acquired lock

好吧,找到问题解决方案了,自问自答了(⊙﹏⊙)b,这是个bug:

https://github.com/gevent/gev...

怪我咯
怪我咯

走同样的路,发现不同的人生

Antworte allen(1)
巴扎黑

= = 到底怎么解决的 没看懂啊

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!