celery:Unrecoverable error: AttributeError("'unicode' object has no attribute 'iteritems')
环境描述
python2+django1.9下使用celery异步处理耗时请求。
celery使用的是celery-with-redis这个第三方库,版本号为3.0。
pip install celery-with-redis
这样安装会将redis、celery-with-redis、redis等一起同时安装。
错误描述
错误提示:Unrecoverable error: AttributeError("'unicode' object has no attribute 'iteritems')
问题发现及解决
将这个错误Google后,在stackoverflow中发现了解决办法,地址:stack overflow,celery-github
问题的症结是redis的版本号为3.0以上,导致celery将其作为消息中间件的时候出现问题,给出的解决方案是安装3.0以下的redis版本。这里我们安装redis==2.10.6
- 首先
pip uninstall redis
- 其次
pip install redis==2.10.6
- 最后
重新运行celery即可。
celery worker -A xxx -l INFO
celery:Unrecoverable error: AttributeError("'unicode' object has no attribute 'iteritems')的更多相关文章
- AttributeError: 'unicode' object has no attribute 'tzinfo' 未解决
Internal Server Error: /demo/machineinfo.htmlTraceback (most recent call last): File "C:\Python ...
- AttributeError: 'dict' object has no attribute 'iteritems'
在python3.6中运行 sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse= ...
- facenet pyhton3.5 训练 train_softmax.py 时报错AttributeError: 'dict' object has no attribute 'iteritems'
报错原因:在进行facenet进行train_softmax.py训练时,在一轮训练结束进行验证时,报错AttributeError: 'dict' object has no attribute ' ...
- 机器学习实战:KNN代码报错“AttributeError: 'dict' object has no attribute 'iteritems'”
报错代码: sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True) 解决 ...
- mygenerator().next() AttributeError: 'generator' object has no attribute 'next'
def mygenerator(): print ("start ...") yield 5 mygenerator() print ("mygenerator():&q ...
- AttributeError: 'list' object has no attribute 'sorted'
效果图: 解决办法: 原因: AttributeError: 'list' object has no attribute 'sorted' 属性错误: list对象没有sorted属性方法. sor ...
- 解决window7 x64位Anaconda启动报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- 解决Win7(x64)Anaconda3报错:AttributeError: '_NamespacePath' object has no attribute 'sort'
最近论文需要用到python做数据分析,python语法简单,但是Windows下安装第三方包恶心的要命,statsmodels用pip死活安装不上,网上查了说包相互依赖windows下的pip不能下 ...
- Django 运行报异常:AttributeError: 'str' object has no attribute 'get'
Technorati Tags: Python,Django,Web 在使用django.contrib.auth用户机制进行用户的验证.登录.注销操作时,遇到这个异常. 首先是写了一个登录的视图,要 ...
随机推荐
- Memento模式(备忘录设计模式)
Memento模式? 使用面向对象编程的方式实现撤销功能时,需要事先保存实例的相关状态信息.然后,在撤销时,还需要根据所保存的信息将实例恢复至原来的状态.这个时候你需要使用Memento设计模式.(以 ...
- Luogu P2624 [HNOI2008]明明的烦恼 Prufer+组合+高精
好的我把标准版过了... 设$ r_i$为$i$的度数 首先,我们设 $ sum = \Sigma r_i-1$,$ tot $ 为所有能够确定度数的点 所以我们有 $ C ^ {sum} _{n-2 ...
- 自定义ClassLoader加载加密的class文件
package com.yd.wmsc.util; public class Test { public void say(){ System.out.println("Say Hello& ...
- Gym 100971B Derangement
要求改换序列,使得没有位置是a[i] == i成立.输出最小要换的步数 首先把a[i] == i的位置记录起来,然后两两互相换就可以了. 对于是奇数的情况,和它前一个换或者后一个换就可以,(注意前一个 ...
- 【Java密码学】用Java数字签名提供XML安全
简介 众所周知,XML在产品和项目开发中起着非常重要的作用.通过XML文档可以获取很多信息,还可以使用XML文件进行CRUD(增加.查询.更新和删除)操作.然而值得注意的是,我们如何确保XML中的数据 ...
- PHP拾贝
$_SERVER['DOCUMENT_ROOT']指向了web服务器文档树的根.(E:/wamp/www/) ********************************************* ...
- 开始使用JQuery 方法
使用jQuery需要3个基本步骤: 1. 下载jQuery.js并保存在网页可以存取的位置.下载链接:dowload 2. 在HTML的head里引用jQuery.js 3. 运用jQuery的方法 ...
- orcale函数
字符函数 1.ASCII 返回与指定的字符对应的十进制数; select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space ...
- ORACLE将查询的多条语句拼在一个字段下
select listagg(字段名,'分隔符') within group (order by 某个字段)
- MVVM技术 - 的实现 @{}来进行 调用那个 DataBinding方法
new Material Design 支持哭 还有 Data Binding 结束 使用DataBindign 结束 我们很方面的实现 MVVM设计模式 什么是MVVM model 呢. ...