I'm attempting to build thinkcspy on my local machine (Mac running 10.12), and continue to bump into an error. My setup was as follows:
brew install python3
pip3 install virtualenv
pip3 install virtualenvwrapper
pip3 install -r requirements.txt
runestone build
On the build step, I get the following error:
/Users/dan/PythonEnvProjects/thinkcspy/_sources/assignments.rst:2: WARNING: Field list ends without a blank line; unexpected unindent.
WARNING: /Users/dan/PythonEnvProjects/thinkcspy/_sources/index.rst:29: (SEVERE/4) Unexpected section title.
About this Project
------------------
looking for now-outdated files... none found
pickling environment... done
checking consistency... /Users/dan/PythonEnvProjects/thinkcspy/_sources/Functions/ProgrammingWithStyle.rst: WARNING: document isn't included in any toctree
/Users/dan/PythonEnvProjects/thinkcspy/_sources/GUIandEventDrivenProgramming/12_model_view_controller.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [ 0%] Appendices/errorsAndDebug
Exception occurred:
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/util/osutil.py", line 61, in relative_uri
if to.startswith(SEP):
jinja2.exceptions.UndefinedError: 'str object' has no attribute 'filename'
The full traceback has been saved in /var/folders/vs/zntd66n50v5_b7x8wp5ln9b00000gn/T/sphinx-err-g83uz0yq.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!
trying alternative database access due to No module named 'dal'
You need to install a DBAPI module - psycopg2 for Postgres
Creating Chapter Information for ./_sources/index.rst
Error in building thinkcspy
The log file referenced above gives the following:
# Python version: 3.6.0 (CPython)
# Docutils version: 0.13.1 release
# Jinja2 version: 2.9.6
# Last messages:
# checking consistency...
#
# done
#
# preparing documents...
#
# done
#
# writing output... [ 0%] Appendices/errorsAndDebug
#
# Loaded extensions:
# alabaster (0.7.10) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/alabaster/__init__.py
# sphinx.ext.mathjax (1.6.1) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/ext/mathjax.py
# runestone.activecode (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/activecode/__init__.py
# runestone.animation (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/animation/__init__.py
# runestone.assess (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/assess/__init__.py
# runestone.assignment (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/assignment/__init__.py
# runestone.blockly (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/blockly/__init__.py
# runestone.clickableArea (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/clickableArea/__init__.py
# runestone.codelens (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/codelens/__init__.py
# runestone.datafile (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/datafile/__init__.py
# runestone.disqus (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/disqus/__init__.py
# runestone.dragndrop (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/dragndrop/__init__.py
# runestone.external (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/external/__init__.py
# runestone.fitb (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/fitb/__init__.py
# runestone.livecode (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/livecode/__init__.py
# runestone.meta (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/meta/__init__.py
# runestone.parsons (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/parsons/__init__.py
# runestone.poll (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/poll/__init__.py
# runestone.question (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/question/__init__.py
# runestone.reveal (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/reveal/__init__.py
# runestone.shortanswer (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/shortanswer/__init__.py
# runestone.tabbedStuff (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/tabbedStuff/__init__.py
# runestone.usageAssignment (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/usageAssignment/__init__.py
# runestone.video (unknown version) from /Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/runestone/video/__init__.py
Traceback (most recent call last):
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/cmdline.py", line 306, in main
app.build(opts.force_all, filenames)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/application.py", line 338, in build
self.builder.build_update()
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 328, in build_update
'out of date' % len(to_build))
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 394, in build
self.write(docnames, list(updated_docnames), method)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 431, in write
self._write_serial(sorted(docnames))
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 440, in _write_serial
self.write_doc(docname, doctree)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/html.py", line 556, in write_doc
self.handle_page(docname, ctx, event_arg=doctree)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/html.py", line 940, in handle_page
output = self.templates.render(templatename, ctx)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/jinja2glue.py", line 176, in render
return self.environment.get_template(template).render(context)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/themes/basic/page.html", line 10, in top-level template code
{%- extends "layout.html" %}
File "/Users/dan/PythonEnvProjects/thinkcspy/_sources/_templates/plugin_layouts/sphinx_bootstrap/layout.html", line 203, in top-level template code
<li>{% include "sourcelink.html" %}</li>
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/themes/basic/../basic/layout.html", line 128, in top-level template code
{%- block csss %}
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/themes/basic/../basic/layout.html", line 129, in block "csss"
{{ css() }}
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/sandbox.py", line 427, in call
return __context.call(__obj, *args, **kwargs)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/runtime.py", line 553, in _invoke
rv = self._func(*arguments)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/themes/basic/../basic/layout.html", line 109, in template
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/jinja2/sandbox.py", line 427, in call
return __context.call(__obj, *args, **kwargs)
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/builders/html.py", line 912, in pathto
uri = relative_uri(baseuri, otheruri) or '#'
File "/Users/dan/Envs/thinkcspy/lib/python3.6/site-packages/sphinx/util/osutil.py", line 61, in relative_uri
if to.startswith(SEP):
jinja2.exceptions.UndefinedError: 'str object' has no attribute 'filename'```
I've tried a number of things, including setting everything up on python2 instead of python3, but I run into similar problems. Any suggestions?
I'm attempting to build thinkcspy on my local machine (Mac running 10.12), and continue to bump into an error. My setup was as follows:
On the build step, I get the following error:
The log file referenced above gives the following: