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

 

posted on 2016-10-28 13:32  zengjf  阅读(2744)  评论(0编辑  收藏  举报

导航