celery错误:Monkey-patching not on the main thread(与gevent的pool不兼容)
/Users/wangpingyang/.pyenv/versions/3.7.2/lib/python3.7/site-packages/httprunner/__init__.py:5: MonkeyPatchWarning: Monkey-patching outside the main native thread. Some APIs will not be available. Expect a KeyError to be printed at shutdown.
import gevent.monkey;gevent.monkey.patch_all()
/Users/wangpingyang/.pyenv/versions/3.7.2/lib/python3.7/site-packages/httprunner/__init__.py:5: MonkeyPatchWarning: Monkey-patching not on the main thread; threading.main_thread().join() will hang from a greenlet
import gevent.monkey;gevent.monkey.patch_all()
/Users/wangpingyang/.pyenv/versions/3.7.2/lib/python3.7/site-packages/httprunner/__init__.py:5: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.contrib.pyopenssl (/Users/wangpingyang/.pyenv/versions/3.7.2/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py)'].
import gevent.monkey;gevent.monkey.patch_all()
方法一import gevent.monkey;gevent.monkey.patch_all(thread=False)
方法二<pythonpath>/Users/wangpingyang/.pyenv/versions/3.7.2/lib/python3.7/site-packages</pythonpath>
方法三
B2206B5D80C227FC45F04A5EF92816A2.png
方法四
直接将Python版本更换为3.6版本
注意:我是在celery中调用多协程的任务,最后错误消失,但没有办法运行任务,改为多线程后,可以运行了,本人用了线程池ThreadPoolExecutor替代了gevent的pool
相关文章
- javascript中错误使用var造成undefined
- Maven 错误:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project appservice-common: Fatal error compiling: 无效的目标发行版: 1.8
- spring 2.5.6 错误:Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher
- spring boot 之 错误:SpelEvaluationException: EL1008E: Property or field 'timestamp' cannot be found on object of type 'java.util.HashMap'
- 分析器错误
- Android开发错误总结
- 使用Pycharm安装插件时发生错误
- 在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误
- AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.
- CRM WebClient UI错误消息的两种显示方式比较
- Can't load AMD 64-bit .dll on a IA 32-bit platform错误消息的处理
- Can't load AMD 64-bit .dll on a IA 32-bit platform错误消息的处理
- WCF 自定义工具错误: 无法生成服务引用“{0}”的代码
- Atitit 增强代码健壮性 出错继续执行恢复模式,就像vbs那样我以为我可以使用Try/Catch,但是我找不到异常后是否可以继续执行代码,并且找不到如何在最后显示错误消息。目录PHP
- 【Codeforces Round #427 (Div. 2) B】The number on the board
- 开发新手最容易犯的50个 Ruby on Rails 错误(1)
- NLP:LSTM之父眼中的深度学习十年简史《The 2010s: Our Decade of Deep Learning / Outlook on the 2020s》的参考文献
- Try setting a different JdbcType for this parameter or a different configuration property错误的详细解决方法
- 【错误记录】Groovy 函数参数动态类型报错 ( Caught: groovy.lang.MissingMethodException: No signature of method )
- 解决“Dynamic Web Module 3.0 requires Java 1.6 or newer.”错误
- VS 设置显示错误列表