abakan-zz / ablog

ABlog for blogging with Sphinx
ablog.readthedocs.org
Other
122 stars 34 forks source link

Problems with Sphinx 1.5 #74

Open kraigher opened 7 years ago

kraigher commented 7 years ago

I started getting this error suddenly, the difference seems to be going from sphinx 1.4.9 to 1.5. Seems the blog path has not been created in the output path (docsbuild). The open call fails because it tries to open blog/atom.xml but the blog path does not exist. Maybe some implicit assumption in ablog is violated in 1.5.

Traceback (most recent call last):
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/cmdline.py", line 296, in main
    app.build(opts.force_all, filenames)
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/application.py", line 327, in build
    self.builder.build_all()
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 211, in build_all
    self.build(None, summary='all source files', method='all')
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 325, in build
    self.finish()
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/builders/html.py", line 469, in finish
    self.finish_tasks.add_task(self.gen_additional_pages)
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/util/parallel.py", line 40, in add_task
    res = task_func()
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/sphinx/builders/html.py", line 494, in gen_additional_pages
    for pagename, context, template in pagelist:
  File "/home/travis/build/VUnit/vunit/.tox/py27-docs/lib/python2.7/site-packages/ablog/post.py", line 660, in generate_atom_feeds
    with open(feed_path, 'w') as out:
IOError: [Errno 2] No such file or directory: u'/home/travis/build/VUnit/vunit/.tox/py27-docs/tmp/docsbuild/blog/atom.xml'
abakan-zz commented 7 years ago

No issues with Sphinx v1.5.1. What's the command that you run? Is this project available for me to try the same command?

kraigher commented 7 years ago

I will try 1.5.1 the failure was discovered with 1.5.

If you want to try check out this project: https://github.com/VUnit/vunit/commit/9eb5b0aa8fdadb4e67c402cf64c1edbab3b02461

Run "tox -e py35-docs"

kraigher commented 7 years ago

Also fails in the same way with 1.5.1

abakan-zz commented 7 years ago

Thanks, I was able to reproduce it in vunit docs, but I don't get the same in ablog docs. I will try to see what causes it in the next couple of weeks.

getreu commented 7 years ago

Same with Sphinx 1.5.3

Sphinx version: 1.5.3
# Python version: 3.5.3 (CPython)
# Docutils version: 0.13.1 release
# Jinja2 version: 2.9.5
# Last messages:
#   done
#   preparing documents...
#   done
#   writing output... [ 33%] about
#   writing output... [ 66%] first-post
#   writing output... [100%] index
#
#   generating indices...
#   genindex
#
# Loaded extensions:
#   sphinx.ext.intersphinx (1.5.3) from /usr/local/lib/python3.5/dist-packages/sphinx/ext/intersphinx.py
#   ablog (0.8.4) from /usr/local/lib/python3.5/dist-packages/ablog/__init__.py
#   sphinx.ext.todo (1.5.3) from /usr/local/lib/python3.5/dist-packages/sphinx/ext/todo.py
#   sphinx.ext.extlinks (1.5.3) from /usr/local/lib/python3.5/dist-packages/sphinx/ext/extlinks.py
#   alabaster (0.7.10) from /usr/local/lib/python3.5/dist-packages/alabaster/__init__.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/sphinx/cmdline.py", line 296, in main
    app.build(opts.force_all, filenames)
  File "/usr/local/lib/python3.5/dist-packages/sphinx/application.py", line 333, in build
    self.builder.build_update()
  File "/usr/local/lib/python3.5/dist-packages/sphinx/builders/__init__.py", line 251, in build_update
    'out of date' % len(to_build))
  File "/usr/local/lib/python3.5/dist-packages/sphinx/builders/__init__.py", line 325, in build
    self.finish()
  File "/usr/local/lib/python3.5/dist-packages/sphinx/builders/html.py", line 472, in finish
    self.finish_tasks.add_task(self.gen_additional_pages)
  File "/usr/local/lib/python3.5/dist-packages/sphinx/util/parallel.py", line 40, in add_task
    res = task_func()
  File "/usr/local/lib/python3.5/dist-packages/sphinx/builders/html.py", line 497, in gen_additional_pages
    for pagename, context, template in pagelist:
  File "/usr/local/lib/python3.5/dist-packages/ablog/post.py", line 660, in generate_atom_feeds
    with open(feed_path, 'w') as out:
FileNotFoundError: [Errno 2] No such file or directory: '/blog.getreu.net/main/_website/blog/atom.xml'
getreu commented 7 years ago

I just discovered that the _website/blog directory must exist. I created it by hand an the above error disappeared.

nabobalis commented 6 years ago

A new version of Ablog (v0.9.0) is out at this repo.

This issue should be fixed now but we made it explicitly support Sphinx>=1.6.