您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> 其他语言 >> Python3 RuntimeError: cannot release un-acquired lock

Python3 RuntimeError: cannot release un-acquired lock

来源:网络整理     时间:2016/11/4 1:21:22     关键词:

关于网友提出的“ Python3 RuntimeError: cannot release un-acquired lock”问题疑问,本网通过在网上对“ Python3 RuntimeError: cannot release un-acquired lock”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: Python3 RuntimeError: cannot release un-acquired lock
描述:

当给爬虫加上多线程的时候报错,由于刚学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 
    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 
    from spider.Spider import Spider
  File "", line 969, in _find_and_load
  File "", line 171, in __exit__
  File "", line 123, in release
RuntimeError: cannot release un-acquired lock

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

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


以上介绍了“ Python3 RuntimeError: cannot release un-acquired lock”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/4066380.html

相关图片

相关文章