Closed MartinHeroux closed 8 years ago
Minor Update - Doconce tutorial file failed compilation In case it helps identify the problem, I tried to compile the tutorial file that comes with Doconce (tutorial.do.txt) and I got a similar error. I tried running the make.sh file and got lots of error messages. I then tried to manually run the line for the latex document. The error message is below.
Error Code doconce format latex tutorial --latex_font=helvetica --latex_code_style=pyg --no_mako --no_abort
running preprocess -DFORMAT=latex -DDEVICE=screen tutorial.do.txt > tmp_preprocess__tutorial.do.txt
Could not run preprocessor:
preprocess -DFORMAT=latex -DDEVICE=screen tutorial.do.txt > tmp_preprocess__tutorial.do.txt
Traceback (most recent call last):
File "/home/martin/anaconda3/envs/python2/bin/preprocess", line 9, in
return code from preprocess: 1
avoided abortion because of --no-abort
Traceback (most recent call last):
File "/home/martin/anaconda3/envs/python2/bin/doconce", line 1518, in
It looks like preprocess is not installed correctly. Make sure you install the version from github.com/hplgit. Download source and run setup.py.
Thank you for the quick reply. You were correct! Install preprocess from your repository fixed the problem and I was able to compile my book.
In case anyone else runs into the same issue and is a novice like myself, they will have to run 'setup.py install'. I tried running setup.py and got a part of the docstring back; a little googling made me realize that you have to specify 'install' as the command line argument to setup.py
Thanks again for the help and for Doconce, a truly great too.
Issue I am able to compile my book on my work computer, but I get an error when I try to compile it on my laptop. I have tried to install Doconce on another laptop and I get the same error message. It appears to be a problem with preprocess, but I am relatively new to Python so the error message does not give me sufficient information about how to solve it. Hopefully someone will have some ideas.
Systems and Programs
Error Message (python2)13:45 ~/.../book$ doconce format pdflatex book.do.txt --latex_code_style=vrb --latex_style=Springer_T2 running preprocess -DFORMAT=pdflatex -DDEVICE=screen book.do.txt > tmp_preprocess__book.do.txt Could not run preprocessor: preprocess -DFORMAT=pdflatex -DDEVICE=screen book.do.txt > tmp_preprocess__book.do.txt Traceback (most recent call last): File "/home/martin/anaconda3/envs/python2/bin/preprocess", line 9, in
load_entry_point('preprocess==1.2.2', 'console_scripts', 'preprocess')()
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-19.1.1-py2.7.egg/pkg_resources/init.py", line 568, in load_entry_point
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-19.1.1-py2.7.egg/pkg_resources/init.py", line 2719, in load_entry_point
ImportError: Entry point ('console_scripts', 'preprocess') not found
return code from preprocess: 1 Abort! (add --no_abort on the command line to avoid this abortion)
Error Message (--no-abort added)
(python2)13:45 ~/.../book$ doconce format pdflatex book.do.txt --latex_code_style=vrb --latex_style=Springer_T2 --no_abort running preprocess -DFORMAT=pdflatex -DDEVICE=screen book.do.txt > tmp_preprocess__book.do.txt Could not run preprocessor: preprocess -DFORMAT=pdflatex -DDEVICE=screen book.do.txt > tmp_preprocess__book.do.txt Traceback (most recent call last): File "/home/martin/anaconda3/envs/python2/bin/preprocess", line 9, in
load_entry_point('preprocess==1.2.2', 'console_scripts', 'preprocess')()
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-19.1.1-py2.7.egg/pkg_resources/init.py", line 568, in load_entry_point
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/setuptools-19.1.1-py2.7.egg/pkg_resources/init.py", line 2719, in load_entry_point
ImportError: Entry point ('console_scripts', 'preprocess') not found
return code from preprocess: 1 avoided abortion because of --no-abort Traceback (most recent call last): File "/home/martin/anaconda3/envs/python2/bin/doconce", line 1518, in
main()
File "/home/martin/anaconda3/envs/python2/bin/doconce", line 1508, in main
eval(command + '()')
File "", line 1, in
File "/home/martin/anaconda3/envs/python2/bin/doconce", line 95, in format
doconce.doconce.format_driver()
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/doconce/doconce.py", line 4774, in format_driver
preprocessor_options)
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/doconce/doconce.py", line 4431, in preprocess
remove_code_and_tex(filestr, format)
File "/home/martin/anaconda3/envs/python2/lib/python2.7/site-packages/doconce/common.py", line 478, in remove_code_and_tex
if filestr[-1] != '\n':
IndexError: string index out of range