Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nikola auto not working #1067

Closed
ghost opened this issue Feb 22, 2014 · 9 comments
Closed

nikola auto not working #1067

ghost opened this issue Feb 22, 2014 · 9 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Feb 22, 2014

I'm a newb so suspect user error, but I installed nikola v6.3.0 (pip install nikola) and have not been able to get nikola auto to work.

Initially I was getting errors due to a more recent version of livereload (which, isn't this marked as fixed?) and resolved by forcing livereload=2.0.0.

The next problem is that the site appears not to rebuild when I save edits to a post. I have not RTFM yet (as instructed :) but when I do:
nikola auto -b

I should be able to edit a post file (e.g. 1.rst) and on save, see the changes immediately, correct? What I see in the server log output and in Chrome dev tools shows that the browser is re-requesting a bunch of files, but I have to manually do nikola build to get the site to rebuild.

I'm using OS X 10.9.1, Python 2.7. Let me know if I can provide any other info; if I get it worked out I'll update the issue.

@ghost
Copy link
Author

ghost commented Feb 22, 2014

Log output below. Note I'm exploring the demo site (nikola init --demo nikola-test)

$ nikola auto
Scanning posts....done!
[2014-02-22T16:33:05Z] NOTICE: Nikola: galleries/demo/index.txt is scheduled to be published in the future (2014-02-22 15:30:53+00:00)
Serving on 127.0.0.1:8000
INFO:root:Browser Connected: http://localhost:8000/
INFO:root:Start watching changes
INFO:root:File conf.py changed
INFO:root:ignore this reload action
INFO:root:Browser Connected: http://localhost:8000/
INFO:root:File posts/1.rst changed
INFO:root:Reload 2 waiters
INFO:tornado.access:200 GET / (::1) 1.10ms
INFO:tornado.access:200 GET / (::1) 0.87ms
INFO:tornado.access:200 GET /livereload.js (::1) 1.03ms
INFO:tornado.access:200 GET /assets/css/all-nocdn.css (::1) 2.61ms
INFO:tornado.access:200 GET /assets/js/all-nocdn.js (::1) 1.60ms
INFO:tornado.access:200 GET /assets/css/all-nocdn.css (::1) 1.63ms
INFO:tornado.access:200 GET /livereload.js (::1) 12.10ms
INFO:tornado.access:200 GET /assets/js/all-nocdn.js (::1) 1.60ms
INFO:tornado.access:200 GET /assets/css/images/overlay.png (::1) 1.02ms
INFO:tornado.access:200 GET /assets/css/images/overlay.png (::1) 0.99ms
WARNING:tornado.access:404 GET /assets/js/jquery-1.10.2.min.map (::1) 0.68ms
WARNING:tornado.access:404 GET /assets/js/jquery-1.10.2.min.map (::1) 0.81ms
INFO:root:Browser Connected: http://localhost:8000/
INFO:root:Browser Connected: http://localhost:8000/
INFO:tornado.access:200 GET / (::1) 0.66ms
INFO:tornado.access:304 GET /livereload.js (::1) 0.80ms
INFO:tornado.access:200 GET /assets/css/all-nocdn.css (::1) 1.74ms
INFO:tornado.access:200 GET /assets/js/all-nocdn.js (::1) 3.30ms
INFO:tornado.access:200 GET /assets/css/images/overlay.png (::1) 0.95ms
INFO:root:Browser Connected: http://localhost:8000/

@Kwpolska Kwpolska added this to the v6.4.0 milestone Feb 22, 2014
@Kwpolska
Copy link
Member

Initially I was getting errors due to a more recent version of livereload (which, isn't this marked as fixed?) and resolved by forcing livereload=2.0.0.

Marked as fixed because it is fixed in master. This bug surfaced after release. Nikola now freezes livereload to prevent future bugs due to such ugly API changes.


I should be able to edit a post file (e.g. 1.rst) and on save, see the changes immediately, correct? What I see in the server log output and in Chrome dev tools shows that the browser is re-requesting a bunch of files, but I have to manually do nikola build to get the site to rebuild.

Reproduced. Will try to fix.

@ghost
Copy link
Author

ghost commented Feb 22, 2014

Forgive me if this is wrong place to ask, but do you recommend in general new users cloning master? I'd like to try the live reloading feature but want a stable set up.

Appreciate the quick fix! Well done.

@asmeurer
Copy link
Contributor

getnikola.com seems to suggest that it is, assuming Travis is passing:

  • Is it a good idea to try github master today? status
  • @Kwpolska
    Copy link
    Member

    GitHub master is generally stable and shippable (especially since v6.4.0 is likely to be released next Friday) — though, as suggested in #1070, one can just replace auto.py with the version from master and have a working nikola auto. For a long time, the handbook even suggested to install from master! (changed in #747 due to issues with GitHub and their zips and because our releases started to be more and more functional)

    @ghost
    Copy link
    Author

    ghost commented Feb 23, 2014

    Great thanks for the info! I'll circle back around soon to check out the auto reloading feature. IMHO if this works well it is a killer feature -- immediate feedback is so important to any type of development.

    @diwakergupta
    Copy link

    Not sure if this is the same bug, but nikola auto just fails for me:

    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/doit/doit_cmd.py", line 105, in run
        return self.sub_cmds[command].parse_execute(args)
      File "/Library/Python/2.7/site-packages/doit/cmd_base.py", line 76, in parse_execute
        return self.execute(params, args)
      File "/Library/Python/2.7/site-packages/nikola/plugin_categories.py", line 83, in execute
        self._execute(options, args)
      File "/Library/Python/2.7/site-packages/nikola/plugins/command/auto.py", line 86, in _execute
        server.serve(port, out_folder)
      File "/Library/Python/2.7/site-packages/livereload/server.py", line 196, in serve
        self.application(debug=debug).listen(self.port, address=host)
      File "/Library/Python/2.7/site-packages/tornado/web.py", line 1463, in listen
        server.listen(port, address)
      File "/Library/Python/2.7/site-packages/tornado/tcpserver.py", line 117, in listen
        sockets = bind_sockets(port, address=address)
      File "/Library/Python/2.7/site-packages/tornado/netutil.py", line 67, in bind_sockets
        0, flags)):
    gaierror: [Errno 8] nodename nor servname provided, or not known
    

    @Kwpolska
    Copy link
    Member

    @diwakergupta

    What happens if you install livereload==2.0.0?

    Or what if you stay with livereload==2.1.0 and replace auto.py with the updated version?

    @diwakergupta
    Copy link

    Updated auto.py works with livereload==2.1.0, thanks!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants