AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

/***************************************************************************
 * AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'
 * 说明:
 *     Tony在用mkdocs的时候遇到这个错误,找一些资料,解决一下。
 *
 *                                  2016-10-28 深圳 南山平山村 曾剑锋
 *************************************************************************/

一、参考文档:
    1. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier' #1
        https://github.com/clonn/simple-livereload/issues/1

二、错误现象:
    zengjf@zengjf:~/zengjf/test$ mkdocs  serve
    INFO    -  Building documentation...
    INFO    -  Cleaning site directory
    [I 161028 13:21:24 server:281] Serving on http://127.0.0.1:8000
    [I 161028 13:21:24 handlers:59] Start watching changes
    Traceback (most recent call last):
      File "/usr/local/bin/mkdocs", line 11, in <module>
        sys.exit(cli())
      File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
        return callback(*args, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/mkdocs/__main__.py", line 115, in serve_command
        livereload=livereload,
      File "/usr/local/lib/python2.7/dist-packages/mkdocs/commands/serve.py", line 84, in serve
        _livereload(host, port, config, builder, tempdir)
      File "/usr/local/lib/python2.7/dist-packages/mkdocs/commands/serve.py", line 27, in _livereload
        server.serve(root=site_dir, host=host, port=int(port), restart_delay=0)
      File "/usr/local/lib/python2.7/dist-packages/livereload/server.py", line 298, in serve
        LiveReloadHandler.start_tasks()
      File "/usr/local/lib/python2.7/dist-packages/livereload/handlers.py", line 60, in start_tasks
        if not cls.watcher.start(cls.poll_tasks):
      File "/usr/local/lib/python2.7/dist-packages/livereload/watcher.py", line 160, in start
        self.notifier = pyinotify.TornadoAsyncNotifier(
    AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

三、解决办法:
    sudo pip install pyinotify --upgrade

 

时间: 2024-10-22 01:24:10

AttributeError: &#39;module&#39; object has no attribute &#39;TornadoAsyncNotifier&#39;的相关文章

提示AttributeError: &amp;#39;module&amp;#39; object has no attribute &amp;#39;HTTPSHandler&amp;#39;解决方法

今天在新机器上安装sqlmap,运行提示AttributeError: 'module' object has no attribute 'HTTPSHandler' 网上找了找资料,发现一篇文章http://paltman.com/2007/11/15/getting-ssl-support-in-python-251/ 输入如下命令: 1 2 3 4 5 6 wget http://www.openssl.org/source/openssl-0.9.8g.tar.gz tar zxf op

AttributeError: &amp;#39;dict_values&amp;#39; object has no attribute &amp;#39;translate&amp;#39;

/***************************************************************************************** * AttributeError: 'dict_values' object has no attribute 'translate' * 说明: * 由于目前使用的是Python3,在解读MySQL的ORM库的时候,结果直接遇到这个错误. * * 2016-10-13 深圳 南山平山村 曾剑锋 **********

python错误:AttributeError: &#039;module&#039; object has no attribute &#039;setdefaultencoding&#039;问题的解决方法_python

Python的字符集处理实在蛋疼,目前使用UTF-8居多,然后默认使用的字符集是ascii,所以我们需要改成utf-8 查看目前系统字符集 复制代码 代码如下: import sys print sys.getdefaultencoding() 执行: 复制代码 代码如下: [root@lee ~]# python a.py ascii 修改成utf-8 复制代码 代码如下: import sys   sys.setdefaultencoding('utf-8')   print sys.get

Python提示AttributeError: &#039;module&#039; object has no attribute &#039;XXX&#039;的问题

问题描述 在运行py脚本时报错AttributeError: 'module' object has no attribute 'urlopen'. 排错,模块名拼写正确,方法urlopen也存在. 代码断点运行,没问题. 方谷歌之. 解决方法 1.在命名py脚本时,不要和python的预留字等类似或者相同. 2.每次py脚本运行时均会产生一个pyc文件.如果产生了则在代码不更新的时候依旧会走pyc.所以也一并要删除. 如下Python代码,执行时报错"AttributeError: 'modu

python-&amp;amp;#39;GridFS&amp;amp;#39; object has no attribute &amp;amp;#39;find&amp;amp;#39;

问题描述 'GridFS' object has no attribute 'find' 1C File ""E:codetake.py"" line 52 in take for s in fs.find({'packageName':doc['_id']}): AttributeError: 'GridFS' object has no attribute 'find' 请问各位朋友我python中报这个错误是什么原因,该如何解决呢?下面是我的代码:#!/bin

python新手求助-初学者python &amp;amp;#39;str&amp;amp;#39; object has no attribute &amp;amp;#39;vals&amp;amp;#39; 怎么解决啊

问题描述 初学者python 'str' object has no attribute 'vals' 怎么解决啊 代码如下 import sqlite3 def convert(value): if value.startswith('~'): return value.strip('~') if not value: value = '0' return float(value) conn=sqlite3.connect('food.db') curs=conn.cursor() try:

python 出现dict&amp;amp;#39; object has no attribute &amp;amp;#39;key&amp;amp;#39;

问题描述 python 出现dict' object has no attribute 'key' def make_omelet(omelet_type): def get_omelet_ingredients(omelet_name): ingredients={"egg":2,"milk":1} if omelet_name=="cheese": ingredients["cheddar"]=2 elif omelet_

Python3下机器学习实战KNN代码出现AttributeError: ‘dict’ object has no attribute错误

出现错误的代码时: result = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True) 错误显示: AttributeError: 'dict' object has no attribute 'iteritems' 之所以会出现上述错误是因为python3中已经没有这个属性,直接改为items即可: result = sorted(classCount.items(), key=operator.i

[Python]attributeError:&amp;#39;module&amp;#39; object has no attribute &amp;#39;dump&amp;#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 =