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 ...
随机推荐
- Codeforces Round #561 (Div. 2) A Tale of Two Lands 【二分】
A Tale of Two Lands 题目链接(点击) The legend of the foundation of Vectorland talks of two integers xx and ...
- 2019-02-03 线性表的顺序储存结构C语言实现
#include<cstdio> #define MAXSIZE 20 typedef int Elemtype; //Elemtype类型根据实际情况而定,这里取int typedef ...
- 一起读《Java编程思想》(第四版)
空余时间看<Java编程思想>(第四版)这本书,遇到不懂的知识点就记录在本博客内. 1.复用具体实现 Java代码复用的三种常见方式:继承.组合.代理. 1.继承:使用extends关键字 ...
- 关联函数-web_save_param_length
int web_save_param_length(const char * Param,const char * Base,LAST); 参数说明: Param:保存长度的参数的名称. Base:参 ...
- 一篇看懂Docker
松勤教育2020.4.20 我要分享 Docker 是什么? Docker 属于 Linux 容器的一种封装,提供简单易用的容器使用接口.它是目前最流行的 Linux 容器解决方案. Dock ...
- Hexo快速构建个人小站-Hexo初始化和将项目托管在Github(一)
背景交代 相信每个程序员都有自己做过个人网站,博客之类的项目了,但是现在还在维护吗?反正我前前后后做过2到3个了,维护一段时间后因为一些不可逆的原因(主要是懒)都没有维护了,购买的一些域名和服务器信息 ...
- LeetCode 78,面试常用小技巧,通过二进制获得所有子集
本文始发于个人公众号:TechFlow,原创不易,求个关注 今天是LeetCode专题第47篇文章,我们一起来看下LeetCode的第78题Subsets(子集). 这题的官方难度是Medium,点赞 ...
- 东方步进电机马达驱动板CVK系列说明书
东方步进电机马达驱动板CVK系列说明书
- cb46a_c++_STL_算法_逆转和旋转reverse_rotate函数advance
cb46a_c++_STL_算法_逆转和旋转reverse_rotateSTL算法--变序性算法reverse() 逆转reverse_copy()一边复制一般逆转rotate()旋转,某个位置开始前 ...
- hashcode和==
public class Main { public static void main(String[] args) { Object o=new Object(); System.out.print ...