启动celery的时候提示:AttributeError: 'module' object has no attribute 'commit_manually'错误

1. 首先进入虚拟环境:

  

***:~/piaoshifu_object/epiao.piaoshifu.cn$ source /home/wyl/piaoshifu_virtualenv/epiaoenv/bin/activate
(epiaoenv)
***:~/piaoshifu_object/epiao.piaoshifu.cn$ 

2. 启动celery:

***:~/piaoshifu_object/epiao.piaoshifu.cn$ python manage.py celery worker

3. 报错:

***:~/piaoshifu_object/epiao.piaoshifu.cn$ python manage.py celery worker
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 312, in execute
    django.setup()
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 86, in create
    module = import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/__init__.py", line 14, in <module>
    from .models import Queue
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/models.py", line 6, in <module>
    from .managers import QueueManager, MessageManager
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/managers.py", line 46, in <module>
    class MessageManager(models.Manager):
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/django/managers.py", line 50, in MessageManager
    @transaction.commit_manually
AttributeError: ‘module‘ object has no attribute ‘commit_manually‘

问题解决之路:

启动celery的时候提示:AttributeError: 'module' object has no attribute 'commit_manually'错误

时间: 2024-10-11 06:51:16

启动celery的时候提示:AttributeError: 'module' object has no attribute 'commit_manually'错误的相关文章

(转)输入pipt提示:AttributeError: &#39;module&#39; object has no attribute &#39;HTTPSConnection&#39;

文章转自:http://write.blog.csdn.net/postedit/51725016 1.测试 [[email protected] ~]# python Python 2.7.8 (default, Jun 17 2016, 01:25:39) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2Type "help", "copyright", "credits" or "

service_identity 模块 AttributeError: &#39;module&#39; object has no attribute &#39;Any&#39;

安装scrapy之后,开始第一步创建scrapy的工程,之后提示一个userwarning:提示我service_identity没有安装,我通过pip install service_identity安装之后,重新创建一个scrapy的爬虫工程有提示以下的错误. Traceback (most recent call last): File "/usr/local/bin/scrapy", line 4, in execute() File "/usr/local/lib/

tensorflow提示出错&#39;module&#39; object has no attribute &#39;pack&#39;

编译旧的代码,会像下面这样提示出错: deconv_shape3 = tf.pack([shape[0], shape[1], shape[2], NUM_OF_CLASSESS]) AttributeError: 'module' object has no attribute 'pack' 因为TF后面的版本修改了这个函数的名称,把tf.pack改为 tf.stack. 因此只需要替换掉,就可以编译通过了. tensorflow提示出错'module' object has no attri

解决:pipenv shell报错:AttributeError: &#39;module&#39; object has no attribute &#39;run&#39;

利用pipenv shell切换到虚拟环境时,显示报错:AttributeError: 'module' object has no attribute 'run' 可以看到是d:\program\python34\lib\site-packages\pipenv\shells.py文件的第62行报错了,提示模块没有run的属性,于是就跑到该文件的第62行去看 选中run,CTRL+B发现能看到源码,源码如下: if sys.version_info >= (3, 6): # Nearly sa

celery:Unrecoverable error: AttributeError(&quot;&#39;unicode&#39; object has no attribute &#39;iteritems&#39;)

环境描述 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'

AttributeError: &#39;module&#39; object has no attribute &#39;dumps&#39;

报错: [[email protected] ~]# ./json.py DATA: [{'a': 'A', 'c': 3.0, 'b': (2, 4)}] Traceback (most recent call last): File "./json.py", line 4, in <module> import json File "/root/json.py", line 8, in <module> data_string = jso

Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attribute 'xxx'".这其实是.pyc文件存在问题. 问题定位: 查看import库的源文件,发现源文件存在且没有错误,同时存在源文件的.pyc文件 问题解决方法: 1. 命名py脚本时,不要与python预留字,模块名等相同 2. 删除该库的.pyc文件(因为py脚本每次运行时均会生成.pyc文件

[Python]attributeError:&#39;module&#39; object has no attribute &#39;dump&#39;

[问题] [代码] 文件名:pickle.py # coding=utf-8 #持久存储 import pickle #b 以二进制的模式打开文件 with open('mydata.pickle','wb') as mysavedata: #用dump保存数据 pickle.dump([1,2,'three'],mysavedata) #b 以二进制的模式打开文件 with open('mydata.pickle','rb') as myreaddata: #使用load恢复数据 list =

Faq_flask : AttributeError: ‘module’ object has no attribute ‘autoescape’

原文地址: http://www.suzf.net/thread-0613-153.html 转载须注明原始出处 前些天从 "spider_net" 上找了一篇文章 , 大致就是利用 highcharts + flask + mysql 构建的一个简单的监控系统 ,经过几番挣扎终于还是给捣持出来了 , 现在总结一下 , 分享给大家 .   o_O 部分报错信息: * Detected change in 'flask_web.py', reloading* Restarting wit