sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
524 stars 75 forks source link

Bug with livereload==2.4.1 #39

Closed rmk135 closed 8 years ago

rmk135 commented 8 years ago

Hi, folks!

I've got some issues today and my short investigation showed me that the root cause is in new version of livereload lib. Please, check my output:

(venv)Romans-Mac-Book-Air:docs romanmogilatov$ sphinx-autobuild . _build/html/
Traceback (most recent call last):
  File "/Users/romanmogilatov/ets-labs/dependency_injector/venv/bin/sphinx-autobuild", line 11, in <module>
    sys.exit(main())
  File "/Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages/sphinx_autobuild/__init__.py", line 280, in main
    server.watch(srcdir, builder)
  File "/Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages/livereload/server.py", line 203, in watch
    self.watcher.watch(filepath, func, delay, ignore=ignore)
TypeError: watch() got an unexpected keyword argument 'ignore'
(venv)Romans-Mac-Book-Air:docs romanmogilatov$ pip show livereload

---
Name: livereload
Version: 2.4.1
Location: /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages
Requires: tornado, six
(venv)Romans-Mac-Book-Air:docs romanmogilatov$ pip install livereload==2.4.0
Downloading/unpacking livereload==2.4.0
  Downloading livereload-2.4.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): tornado in /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages (from livereload==2.4.0)
Requirement already satisfied (use --upgrade to upgrade): six in /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages (from livereload==2.4.0)
Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname in /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages (from tornado->livereload==2.4.0)
Requirement already satisfied (use --upgrade to upgrade): singledispatch in /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages (from tornado->livereload==2.4.0)
Requirement already satisfied (use --upgrade to upgrade): certifi in /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages (from tornado->livereload==2.4.0)
Requirement already satisfied (use --upgrade to upgrade): backports-abc>=0.4 in /Users/romanmogilatov/ets-labs/dependency_injector/venv/lib/python2.7/site-packages (from tornado->livereload==2.4.0)
Installing collected packages: livereload
  Found existing installation: livereload 2.4.1
    Uninstalling livereload:
      Successfully uninstalled livereload
Successfully installed livereload
Cleaning up...
(venv)Romans-Mac-Book-Air:docs romanmogilatov$ sphinx-autobuild . _build/html/
[I 160119 15:57:45 server:271] Serving on http://127.0.0.1:8000
[I 160119 15:57:45 handlers:58] Start watching changes
[I 160119 15:57:45 handlers:60] Start detecting changes
c^C[I 160119 15:57:48 server:291] Shutting down...
(venv)Romans-Mac-Book-Air:docs romanmogilatov$
rmk135 commented 8 years ago

Also I found livereload 2.4.1 has been published just today

madisonb commented 8 years ago

@rmk135 Downgrading livereload back to 2.4.0 solved my issue. Culprit seems to be at https://github.com/GaretJax/sphinx-autobuild/blob/develop/requirements.txt#L7

EDIT: I see in your output above you already know the fix. Leaving here for anyone else having this issue.

rmk135 commented 8 years ago

@madisonb Yeah, but it is still just a break-fix.

It would be good if someone could investigate livereload API changes and make corresponding changes in sphinx-autobuild, cause currently all new installs are broken cause this issue.

Other thing that could be done is just putting a restriction to the https://github.com/GaretJax/sphinx-autobuild/blob/develop/requirements.txt#L7 like a livereload>=2.3.0,<=2.4.0. I will try to do it on the weekends if no one other will.