benjamin.a.lau at gmail
Apr 19, 2012, 5:54 PM
Post #3 of 4
I think rjollos may have gone a bit overboard with cleaning up the
Re: NameError: global name 'os' is not defined
[In reply to]
import statements in this plugin...
If you add a line:
to the formats.py file in the plugin sources... that should fix the
problem. I don't know how you installed the plugin... but you'll need
to grab the latest sources from svn, build it and install it again.
svn co http://trac-hacks.org/svn/tracwikitopdfplugin/0.11/ tracwikitopdfplugin
python setup.py install
python setup.py bdist_egg (the egg will be in the dist directory and
can be copied to you trac environment's plugins directory.
I'll hope that your python is the same one as your one for trac (2.4
based on your logs).
If you run into trouble feel free to pop over to #trac on irc.freenode.net
On Thu, Apr 19, 2012 at 1:28 PM, Jordan <jordan.padams [at] gmail> wrote:
> I am running Trac 0.12 with the mod_python installation. When trying to
> test the installation of the TracWikiToPDF Plugin, when I attempt to create
> the PDF, I come across this error:
> ERROR: Internal Server Error:
> Traceback (most recent call last):
> File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 513, in
> File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 235, in
> resp = chosen_handler.process_request(req)
> File "/usr/lib/python2.4/site-packages/trac/admin/web_ui.py", line 121, in
> File "build/bdist.linux-i686/egg/wikitopdf/web_ui.py", line 79, in
> File "build/bdist.linux-i686/egg/wikitopdf/formats.py", line 26, in
> NameError: global name 'os' is not defined
> I am by no means an expert with Trac installations or Python so any help
> would be greatly appreciated.
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To view this discussion on the web visit
> To post to this group, send email to trac-users [at] googlegroups
> To unsubscribe from this group, send email to
> trac-users+unsubscribe [at] googlegroups
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.