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

many errors on building #256

Open
baiyuxiong opened this issue Mar 31, 2017 · 5 comments
Open

many errors on building #256

baiyuxiong opened this issue Mar 31, 2017 · 5 comments

Comments

@baiyuxiong
Copy link

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
Copy link

rubenvann commented Jun 5, 2017

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

@baiyuxiong
Copy link
Author

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

visit http://localhost:8000 for docs

@baiyuxiong
Copy link
Author

pdflatex is needed when building pdf format

@baiyuxiong
Copy link
Author

baiyuxiong commented Aug 7, 2017

_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
Copy link

mhindery commented Apr 8, 2018

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

  • sed fix from above comment necessary
  • Pandox --chapters and -S options are removed. In build.py these replacements are necessary:
    • Line 161:
      python cmd = '{pandoc} --top-level-division=chapter -f markdown+smart+mmd_title_block --highlight-style=kate -o 500L.epub epubtitle.txt introduction.markdown {markdowns}'
    • Line 217:
      python temp = '{pandoc} -V chaptertoken={chaptertoken} -t latex --top-level-division=chapter -f markdown+smart+mmd_title_block+tex_math_dollars --template=tex/chaptertemplate.tex --no-highlight -o tex/{basename}.tex.1 tex/{md}'

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.

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

No branches or pull requests

3 participants