Opened 5 years ago

Closed 5 years ago

# Page is nor rendering: AttributeError: 'TracMathPlugin' object has no attribute 'show_err'

Reported by: Owned by: Manuel kisielk normal TracMathPlugin normal manuel@… 0.12

### Description

I'm trying to render a easy Latex formula, but the page is not rendering. With 0.11 it rendered fine, but since I updated my Trac to 0.12 it doesn't render.

The code:

\begin{equation*}
\#S = \lceil log_2(\#I) - log_2(\#G) \rceil
\end{equation*}


Here my Phyton traceback: File "/opt/bitnami/projects/.egg-cache/Trac-0.12.1-py2.5.egg-tmp/trac/wiki/templates/wiki_view.html", line 58, in <Expression u'wiki_to_html(context, text)'> File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1497, in format_to_html File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1452, in generate File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1201, in format File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1091, in handle_code_block File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 304, in process File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 291, in _macro_processor File "build/bdist.linux-i686/egg/tracmath/tracmath.py", line 89, in expand_macro File "build/bdist.linux-i686/egg/tracmath/tracmath.py", line 157, in _internal_render

### comment:1 follow-up: ↓ 2 Changed 5 years ago by kisielk

• Status changed from new to assigned

Can you try the version at https://bitbucket.org/kisielk/tracmathplugin/get/3400be420ed8.tar.gz and let me know if it fixes the bug for you?

### comment:2 in reply to: ↑ 1 Changed 5 years ago by Akinfold

Can you try the version at https://bitbucket.org/kisielk/tracmathplugin/get/3400be420ed8.tar.gz and let me know if it fixes the bug for you?

It fixes the bug for my Trac 0.12. Thanks!

### comment:3 Changed 5 years ago by kisielk

Good to hear. I'll issue a new patch release soon.

### comment:4 Changed 5 years ago by Manuel

Hey kisielk, thank you for your effort. I tried to install your version but when I'm trying to display a page with some latex I get an error:

OSError: [Errno 2] No such file or directory

I don't know what could be wrong. I uninstalled the release version of TracMath 0.3 with easy_install and removed the .egg file. After that I installed your version, restarted the server and activated the module. At the end I tried to display a normal page with the latex code.

Here is the Trackback: File "/opt/bitnami/projects/.egg-cache/Trac-0.12.1-py2.5.egg-tmp/trac/wiki/templates/wiki_view.html", line 58, in <Expression u'wiki_to_html(context, text)'>

File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1497, in format_to_html

File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1452, in generate

File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1201, in format

File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 1091, in handle_code_block

File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 304, in process

File "/opt/bitnami/trac/lib/python2.5/site-packages/Trac-0.12.1-py2.5.egg/trac/wiki/formatter.py", line 291, in _macro_processor

File "build/bdist.linux-i686/egg/tracmath/tracmath.py", line 89, in expand_macro

File "build/bdist.linux-i686/egg/tracmath/tracmath.py", line 153, in _internal_render

File "/opt/bitnami/python/lib/python2.5/subprocess.py", line 594, in init

File "/opt/bitnami/python/lib/python2.5/subprocess.py", line 1097, in _execute_child

### comment:5 Changed 5 years ago by kisielk

Manuel,

That means your

[tracmath]
latex_cmd =


option is not configured correctly, or that the latex program can't be found.

### comment:6 Changed 5 years ago by kisielk

• Resolution set to fixed
• Status changed from assigned to closed

This is fixed in the 0.4 release.