Opened 13 years ago
Closed 13 years ago
#9066 closed defect (fixed)
TypeError: execv() argument 1 must be encoded string without NULL bytes, not str
Reported by: | anonymous | Owned by: | Kamil Kisiel |
---|---|---|---|
Priority: | normal | Component: | TracMathPlugin |
Severity: | normal | Keywords: | TypeError: execv() |
Cc: | Trac Release: | 0.12 |
Description
my Trac version is 0.12b1 and I use the version https://bitbucket.org/kisielk/tracmathplugin/get/3400be420ed8.tar.gz as the solution of the 'show_err' error mentioned in the ticket 8557.
but there comes the error message
Trac detected an internal error: TypeError: execv() argument 1 must be (encoded string without NULL bytes), not str
my Python Traceback
File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/templates/wiki_view.html", line 58, in <Expression u'wiki_to_html(context, text)'> <div id="wikipage" py:content="wiki_to_html(context, text)" /> File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/util/compat.py", line 83, in newfunc return func_(*(args + fargs), **dict(kwargs, **fkwargs)) File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/formatter.py", line 1494, in format_to_html return HtmlFormatter(env, context, wikidom).generate(escape_newlines) File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/formatter.py", line 1449, in generate escape_newlines) File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/formatter.py", line 1191, in format self.handle_code_block(line, block_start_match) File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/formatter.py", line 1086, in handle_code_block processed = self.code_processor.process(code_text) File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/formatter.py", line 304, in process text = self.processor(text) File "/usr/lib/python2.4/site-packages/Trac-0.12b1-py2.4.egg/trac/wiki/formatter.py", line 291, in _macro_processor text) File "build/bdist.linux-i686/egg/tracmath/tracmath.py", line 89, in expand_macroFile "build/bdist.linux-i686/egg/tracmath/tracmath.py", line 153, in _internal_renderFile "/usr/lib/python2.4/subprocess.py", line 550, in __init__ errread, errwrite) File "/usr/lib/python2.4/subprocess.py", line 996, in _execute_child raise child_exception
how can I solve the problem?
regards
Attachments (0)
Change History (9)
comment:1 Changed 13 years ago by
Keywords: | TypeError: execv() added |
---|
comment:2 Changed 13 years ago by
Component: | SELECT A HACK → TracMathPlugin |
---|---|
Owner: | changed from anonymous to Kamil Kisiel |
comment:3 follow-up: 4 Changed 13 years ago by
comment:4 follow-up: 5 Changed 13 years ago by
just some more information:
the tex file was succesfully created in the cache directory:
/tmp/tracmath/da1c76cfc5919c0aea6d9c58c65037cd94868e1c.tex
when now executing the latex and dvipng commands manually in that cache directory they succeed:
latex da1c76cfc5919c0aea6d9c58c65037cd94868e1c.tex dvipng -T tight -x 1200 -z 9 -bg Transparent -o da1c76cfc5919c0aea6d9c58c65037cd94868e1c.png da1c76cfc5919c0aea6d9c58c65037cd94868e1c.dvi
the resulting png is now in the cache directory and rendered correct in trac
Replying to anonymous
comment:5 follow-up: 6 Changed 13 years ago by
Replying to stefan.brunig@gmail.com:
just some more information: ...
it works! But how can I get it worked automatically by fixing the tracmatch source code?
I find the commands in line 159~161 https://bitbucket.org/kisielk/tracmathplugin/src/3400be420ed8/tracmath/tracmath.py there maybe some mistake in the execution
comment:6 follow-up: 7 Changed 13 years ago by
actually I wonder if the error is more or less python related, maybe there are issues by interpreting the given command as line 153 succeeds?
comment:7 Changed 13 years ago by
Replying to stefan.brunig@gmail.com:
actually I wonder if the error is more or less python related, maybe there are issues by interpreting the given command as line 153 succeeds?
sorry, I have to correct myself... in fact line 153 causes the error:
latex_proc = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE)
comment:8 Changed 13 years ago by
Status: | new → assigned |
---|
I can't seem to reproduce it. It seems like there must be a null bytes somehow sneaking their way in to the command run by subprocess. Does this happen for all formulas or just some of them?
If it's for all of then, can you attach a copy of your trac.ini to this ticket? Make sure you use the original file and not a copy-paste.
comment:9 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I believe this has been fixed in version 0.4 of the plugin.
I got same here (trac 0.12.2 and TracMath-0.3-py2.5.egg):
Is there already some kind of workaround to get it running?
regards