aosabook / 500lines

500 Lines or Less
Other
29.26k stars 5.87k forks source link

many errors on building #256

Open baiyuxiong opened 7 years ago

baiyuxiong commented 7 years ago

OS: Mac 10.12.3 python Python 2.7.12, no virtualenv used

cmd: python build.py --html

output: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/envoy/core.py", line 214, in run out, err = cmd.run(data, timeout, kill_timeout, env, cwd) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/envoy/core.py", line 93, in run raise self.exc OSError: [Errno 2] No such file or directory

./_build/fix_html_title.sh html/content/pages/template-engine.md

sed: 1: "html/content/pages/temp ...": extra characters at the end of h command

python _build/preprocessor.py --chapter 22 --html-refs --output=./web-server/web-server.markdown.1 --latex ./web-server/web-server.markdown

pandoc --csl=minutiae/pdf/ieee.csl --mathjax -t html -f markdown+citations -o html/content/pages/web-server.md ./web-server/web-server.markdown.1

No such file or directory Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/envoy/core.py", line 214, in run out, err = cmd.run(data, timeout, kill_timeout, env, cwd) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/envoy/core.py", line 93, in run raise self.exc OSError: [Errno 2] No such file or directory

./_build/fix_html_title.sh html/content/pages/web-server.md

sed: 1: "html/content/pages/web- ...": extra characters at the end of h command

make html pelican /Users/baiyuxiong/code/500lines/html/content -o /Users/baiyuxiong/code/500lines/html/output -s /Users/baiyuxiong/code/500lines/html/pelicanconf.py

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pelican", line 7, in from pelican import main File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pelican/init.py", line 19, in from pelican.generators import (ArticlesGenerator, PagesGenerator, File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pelican/generators.py", line 20, in from pelican.cache import FileStampDataCacher File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pelican/cache.py", line 10, in from pelican.utils import mkdir_p File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pelican/utils.py", line 29, in from six.moves.html_parser import HTMLParser ImportError: No module named html_parser make: *** [html] Error 1

cp -a ./blockcode/blockcode-images html/output/pages/

cp -a ./ci/ci-images html/output/pages/

.......

rubenvann commented 7 years ago

Having the same problem on 64-bit Linux Mint 18.1, with both the HTML and the PDF build.

baiyuxiong commented 7 years ago

pandoc is need. I fixed this by installing pandoc : brew install pandoc

visit http://localhost:8000 for docs

baiyuxiong commented 7 years ago

pdflatex is needed when building pdf format

baiyuxiong commented 7 years ago

_build/fix_html_title.sh should been edited before building on MAC. Add "" after "-i"

before:

#!/usr/bin/env bash

sed -i 's|<p>\(title:.*\)author:\(.*\)</p>|\1\
author:\2\
|' $1

after:

#!/usr/bin/env bash

sed -i "" 's|<p>\(title:.*\)author:\(.*\)</p>|\1\
author:\2\
|' $1
mhindery commented 6 years ago

Latest try on Mac OSX (High Sierra, mactex + pandox & all dependancies installed):

Builds afterwards (489 pages in pdf). However, still shows build errors in CLI and noticed several typesetting issues in the resulting pdf. Building using TexMaker with the *.tex files generated by the preprocessor steps from the python build script does not work.