Edgewall Software
  • Home
  • Trac
  • Genshi
  • Babel
  • Bitten
  • Home
  • Download
  • Documentation
  • Mailing Lists
  • License
  • FAQ
wiki:TracFaq

Context Navigation

  • spacer +0spacer
  • Start Page
  • Index
  • History

Trac FAQ

Here you can find answers to some of the most frequently asked questions about Trac.

If you have a question not answered on this page, you can ask it on the MailingList or in the IrcChannel. See the TracSupport page for more options on getting support for Trac.


Note: At the occasion of the upcoming 1.0 release, we're restarting the FAQ from scratch. If you don't find the answer you're looking for here, also have a look in the old 0.12/TracFaq (for Trac 0.12 and older versions).


  1. Installation troubleshooting
    1. Installation from source
      1. Q: Why do I get NameError: global name 'log' is not defined when trying to use setup.py?
      2. Q: Why does installing distribute fails with ValueError: A 0.7-series setuptools cannot be installed with distribute.?
      3. Q: Why does Apache crashes (500) with a ZipImportError in the error log?
      4. Q: Trac /about says 1.0, but the style looks pre-1.0
  2. Trac development
    1. Q: How to extend Trac?
    2. Q: How to contribute to Trac?


Installation troubleshooting

Installation from source

Q: Why do I get NameError: global name 'log' is not defined when trying to use setup.py?

../trunk/$ python setup.py egg_info
running egg_info
...
  File "build/bdist.linux-x86_64/egg/setuptools/svn_util.py", line 55, in get_sections
NameError: global name 'log' is not defined

A: You're most likely working from a Subversion 1.7 checkout and you're using a too old setuptools package (e.g. /setuptools-0.7a1dev_r66608).

See #7598. Upgrade to a newer setuptools, downgrade to svn 1.6.x, or use distribute.

Q: Why does installing distribute fails with ValueError: A 0.7-series setuptools cannot be installed with distribute.?

You tried to install distribute as advised elsewhere:

$ curl python-distribute.org/distribute_setup.py | python

but you're greeted with:

ValueError: A 0.7-series setuptools cannot be installed with distribute. Found one at /packages/trac/virtualenv-0.13/lib/python2.7/site-packages/setuptools-0.7a1dev_r66608-py2.7.egg

A: Don't give up, it's just setuptools giving you a last fight.

You can remove the offending setuptools .egg … and if it keeps re-appearing, you have it installed not only in the virtualenv but also in the parent Python installation (the one in which you installed virtualenv itself). If this is the case, remove it from there as well, installing distribute should now work.

Q: Why does Apache crashes (500) with a ZipImportError in the error log?

[Tue Aug 07 09:08:26 2012] [error] [client 172.25.16.59] mod_wsgi (pid=16444): Exception occurred processing WSGI script '/packages/trac/virtualenv-0.13/bin/trac.wsgi'., referer: dserver/trac/bct/timeline
...
[Tue Aug 07 09:08:26 2012] [error] [client 172.25.16.59]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 1197, in _get, referer: xxx/trac/bct/timeline
[Tue Aug 07 09:08:26 2012] [error] [client 172.25.16.59] ZipImportError: bad local file header in /packages/trac/virtualenv-0.13/lib/python2.7/site-packages/Genshi-0.6-py2.7.egg, referer: xxx/trac/bct/timeline

A: You most certainly forgot to stop and restart your server during an upgrade. The zip importer mechanism keeps an internal cache which has trouble detecting replaced files, so a restart is needed (see TracUpgrade#ZipImportError). Do it now.

Q: Trac /about says 1.0, but the style looks pre-1.0

A: You probably just need to convince your browser that the CSS files have changed. Try "force reload" (CTRL+R or CTRL+Shift+R, depending on your browser). This is a common issue (see e.g. #10797).

If that still doesn't work, look in your server configuration to see where the chrome files are supposed to be served from (Alias or AliasMatch directive), and maybe you'll see that you're serving them as static files from a different location:

Alias /trac/bct/chrome /packages/trac/virtualenv-0.13/share/htdocs

In this case, don't forget to:

$ trac-admin <yourenv> deploy /packages/trac/virtualenv-0.13/share

See TracUpgrade#a5.Refreshstaticresources.

Trac development

Q: How to extend Trac?

A: The primary way to extend Trac is to write plugins in Python. Look for the extensive documentation below TracDev/, maybe starting with the overview pages.

The community site trac-hacks.org is a great place for finding plugins, it also contains a few tutorials to get you started.

Q: How to contribute to Trac?

A: There are many ways to contribute back, see HowToContribute for details (you should have guessed ;-) ).

Also have a look at the documentation below TracDev/, in particular the pages below the Contributing section.

Last modified 2 months ago Last modified on Sep 18, 2012 1:26:08 PM

Attachments (1)

  • TracFaq.txt​ (3.8 KB) - added by gabriel.all@… 2 months ago. Algumas palavras não puderam ser traduzidas.

Download all attachments as: .zip

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.