Python3 RuntimeError: cannot release un-acquired lock

 无语噶流浪 发布于 2022-10-27 13:46

当给爬虫加上多线程的时候报错,由于刚学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...

1 个回答
  • = = 到底怎么解决的 没看懂啊

    2022-10-28 12:09 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有