celery 错误相关:Monkey-patching not on the main thread; threading.main_thread().join() will hang from a greenlet
/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>
方法三

方法四
直接将Python版本更换为3.6版本
注意:我是在celery中调用多协程的任务,最后错误消失,但没有办法运行任务,改为多线程后,可以运行了
作者:沈宥
链接:https://www.jianshu.com/p/fb8a9ee7a349
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
celery 错误相关:Monkey-patching not on the main thread; threading.main_thread().join() will hang from a greenlet的更多相关文章
- PHP 错误与异常 笔记与总结(3)PHP 配置文件(php.ini)中与错误相关的选项 与 设置错误级别
[PHP 配置文件中与错误相关的选项 ] 选项 描述 error_reporting 设置错误报告的级别 display_errors 是否显示错误 log_errors 设置是否将错误信息记录到日志 ...
- 错误 在类中找不到main方法请将main方法定义为 public static void main String args否则JavaFX应用程序类必须扩展javafx-ap
最近在使用eclipse编写java程序时遇到这样一个问题: 错误在类中找不到main方法,请将main方法定义为 public static void main(String[] args)否则 J ...
- 错误: 在类中找不到 main 方法, 请将 main 方法定义为:public static void main(String[] args)否则 JavaFX 应用程序类必须扩展javafx.ap
最近在使用eclipse编写java程序时遇到这样一个问题: 错误在类中找不到main方法,请将main方法定义为 public static void main(String[] args)否则 J ...
- Unity3d报告奇怪的错误CompareBaseObjectsInternal can only be called from the main thread.
其中使用了该项目.NET的Async Socket代码.后来不知道什么时候这个奇怪的错误的出现: CompareBaseObjectsInternal can only be called from ...
- 错误详情:已取消该操作。--------- 在 System.Threading.CancellationToken.ThrowOperationCanceledException()
错误详情:已取消该操作.--------- 在 System.Threading.CancellationToken.ThrowOperationCanceledException() 在 Syste ...
- Apicloud_(问题)P54提示错误:Uncaught SyntaxError: Unexpected token ) at main.html : 117
<30天App开发从0到1:APICloud移动开发实战>第54页 打开main.html,在apiready中添加一段代码 api.addEventListener({ name: 'c ...
- 错误: 在类中找不到 main 方法, 请将 main 方法定义为:    public static void main(String[] args) 否则 JavaFX 应用程序类必须扩展javafx.application.Application 。
昨天在eclipse编写JAVA程序时,遇到一个问题: 错误: 在类中找不到 main 方法, 请将 main 方法定义为: public static void main(String[] a ...
- java异常和错误相关
1.挺常见的一个问题,是个error java.lang.NoClassDefFoundError: 当目前执行的类已经编译,但是找不到它的定义时 也就是说你如果编译了一个类B,在类A中调用,编译完成 ...
- Mysql 错误相关
有几天没启动本地的 MySQL 了,今天打开小海豚,直接给我弹出了连接失败,这是怎么回事,就直接进入命令行,发现也有问题,输入密码后一闪而过,也没有什么提示信息给我,百度了先,都说是修改 MySQL ...
随机推荐
- 综合练习: PIVOT、UNPIVOT、GROUPING SETS、GROUPING_ID_1
综合练习: PIVOT.UNPIVOT.GROUPING SETS.GROUPING_ID 问题1:Desired output: empid cnt2007 cnt2008 cnt2009 ---- ...
- Redis在CentOS for LInux上安装详细教程
1.首先上传安装包,这里我以 redis-5.0.8.tar.gz 为例子. Linux下载redis地址:wget http://download.redis.io/releases/redis-5 ...
- JS遍历对象的几种方法
几天前一个小伙伴问我 Object.getOwnPropertyNames() 是干什么用的 平时还真没有使用到这个方法,一时不知如何回答 从方法名称来分析,应该是返回的是对象自身属性名组成的数组 那 ...
- json 文件注释
json文件注释: "_comment":"this is commets", "jsondata":{ "注释":&q ...
- FastJson对实体类和Json还有JSONObject相互转换
1. 实体类或集合转JSON串 String besnString = JSONObject.toJSONString(实体类); 2.JSON串转JSONObject JSONObject json ...
- ImageLoader在Gridview中的使用
原理和ImageLoader在Listview中的使用一样,只有下面的几点变化 主页面的布局 <?xml version="1.0" encoding="utf-8 ...
- redis高级命令1
设置name的过期时间是20秒 redis默认是16个数据库,默认是将数据存储在第0个数据库中 因为默认是0,当你选择其他数据的时候,是没有值的
- NFC芯片选型及基本电路框架
RFID作为一项专业度较高的技术,在一些公司,可能还会专门招聘专业的RFID工程师.本篇阐述的涉及到的只是基本选型设计.电路框架,关于RFID天线调试.低功耗检卡调试等,后续再其他篇章会继续更新! N ...
- org.hibernate.LazyInitializationException异常解决办法
org.hibernate.LazyInitializationException异常failed to lazily initialize a collection...的解决方案使用hiberna ...
- 小师妹学JVM之:逃逸分析和TLAB
目录 简介 逃逸分析和栈上分配 TLAB简介 TLAB详解 设置TLAB空间的大小 TLAB中大对象的分配 TLAB空间中的浪费 总结 简介 逃逸分析我们在JDK14中JVM的性能优化一文中已经讲过了 ...