nyergler / hieroglyph

Generate HTML presentations from plain text sources with all the power of Sphinx.
https://hieroglyph.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
261 stars 73 forks source link

failed to run hieroglyph-test on Mac #88

Closed jwlim closed 9 years ago

jwlim commented 9 years ago

Hello, I tried to run hieroglyph-test on my Mac, but failed to build slides. I wonder if this is a bug or due to system setting problems. I tested sphynx-test and it worked fine. Thanks,

jwlim@jwlim-mbp-r ~/Documents/slides/hieroglyph-test $ make slides
sphinx-build -b slides -d _build/doctrees   . _build/slides
Running Sphinx v1.3b3
making output directory...
loading pickled environment... not yet created
loading intersphinx inventory from https://docs.python.org/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [slides]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] index                                                                                                                                                                                                                   
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                                                                                                                                                                                    
Exception occurred:
  File "/usr/local/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/utils.py", line 388, in __getitem__
    rv = self._mapping[key]
TypeError: unhashable type: 'dict'
The full traceback has been saved in /var/folders/87/fhfl43hd0tj05wlchl06jyh80000gn/T/sphinx-err-QpwjJa.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [slides] Error 1

jwlim@jwlim-mbp-r ~/Documents/slides/hieroglyph-test $ cat /var/folders/87/fhfl43hd0tj05wlchl06jyh80000gn/T/sphinx-err-QpwjJa.log
# Sphinx version: 1.3b3
# Python version: 2.7.9
# Docutils version: 0.11 release
# Jinja2 version: 2.7.2
# Last messages:
#   
#   looking for now-outdated files...
#   none found
#   pickling environment...
#   done
#   checking consistency...
#   done
#   preparing documents...
#   done
#   writing output... [100%] index
# Loaded extensions:
#   sphinx.ext.intersphinx (1.3b3) from /usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/ext/intersphinx.pyc
#   sphinx.ext.doctest (1.3b3) from /usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/ext/doctest.pyc
#   alabaster (0.7.1) from /usr/local/lib/python2.7/site-packages/alabaster-0.7.1-py2.7.egg/alabaster/__init__.pyc
#   sphinx.ext.coverage (1.3b3) from /usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/ext/coverage.pyc
#   sphinx.ext.pngmath (1.3b3) from /usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/ext/pngmath.pyc
#   sphinx.ext.todo (1.3b3) from /usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/ext/todo.pyc
#   sphinx.ext.ifconfig (1.3b3) from /usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/ext/ifconfig.pyc
#   hieroglyph (unknown version) from /usr/local/lib/python2.7/site-packages/hieroglyph-0.6.5-py2.7.egg/hieroglyph/__init__.pyc
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/cmdline.py", line 246, in main
    app.build(opts.force_all, filenames)
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/application.py", line 263, in build
    self.builder.build_update()
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/builders/__init__.py", line 237, in build_update
    'out of date' % len(to_build))
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/builders/__init__.py", line 308, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/builders/__init__.py", line 346, in write
    self._write_serial(sorted(docnames), warnings)
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/builders/__init__.py", line 354, in _write_serial
    self.write_doc(docname, doctree)
  File "/usr/local/lib/python2.7/site-packages/hieroglyph-0.6.5-py2.7.egg/hieroglyph/builder.py", line 101, in write_doc
    result = super(AbstractSlideBuilder, self).write_doc(docname, doctree)
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/builders/html.py", line 441, in write_doc
    self.handle_page(docname, ctx, event_arg=doctree)
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/builders/html.py", line 780, in handle_page
    output = self.templates.render(templatename, ctx)
  File "/usr/local/lib/python2.7/site-packages/Sphinx-1.3b3-py2.7.egg/sphinx/jinja2glue.py", line 133, in render
    return self.environment.get_template(template).render(context)
  File "/usr/local/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/environment.py", line 791, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/local/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/environment.py", line 761, in _load_template
    template = self.cache.get(name)
  File "/usr/local/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/utils.py", line 339, in get
    return self[key]
  File "/usr/local/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg/jinja2/utils.py", line 388, in __getitem__
    rv = self._mapping[key]
TypeError: unhashable type: 'dict'
jwlim@jwlim-mbp-r ~/Documents/slides/hieroglyph-test $ 
nyergler commented 9 years ago

It looks like it's raising an exception during template rendering; a couple questions/suggestions:

jwlim commented 9 years ago

I installed hieroglyph using easyinstall. Is there a chance that the development version is installed through this? I am running the 0.6.5 version of hieroglyph.

jwlim@jwlim-mbp-r ~/Documents/slides/hieroglyph-test $ easy_install hieroglyph
Searching for hieroglyph
Best match: hieroglyph 0.6.5
Processing hieroglyph-0.6.5-py2.7.egg
hieroglyph 0.6.5 is already the active version in easy-install.pth
Installing hieroglyph-quickstart script to /usr/local/bin

Using /usr/local/lib/python2.7/site-packages/hieroglyph-0.6.5-py2.7.egg
Processing dependencies for hieroglyph
Finished processing dependencies for hieroglyph
html_theme = 'alabaster'
...
# -- Hieroglyph Slide Configuration ------------

extensions += [
    'hieroglyph',
]

slide_theme = 'single-level'
slide_levels = 3

I also tried slides and it didn't work.

I did not make any changes to conf.py after running hieroglyph-test.

Thanks a lot for the support!

nyergler commented 9 years ago

Thanks for the details.

Hieroglyph 0.6.5 has a known incompatibility with Sphinx 1.3, which was just released. See https://github.com/nyergler/hieroglyph/issues/84 for details.

I'm working on getting a new release out that will fix this, but until then you can work around it by forcing Sphinx to use the 1.2 series:

$ easy_install sphinx~=1.2.0

I'll also add a notice to the README momentarily.

Sorry for the trouble, thanks for reporting this!

jwlim commented 9 years ago

Thanks for the quick answer! It solved the problem, and I look forward to the updated version of hieroglyph soon. :)

On Mon, Mar 16, 2015 at 11:59 AM, Nathan Yergler notifications@github.com wrote:

Closed #88 https://github.com/nyergler/hieroglyph/issues/88.

— Reply to this email directly or view it on GitHub https://github.com/nyergler/hieroglyph/issues/88#event-254953805.