Changes between Version 2 and Version 3 of sottopagina


Ignore:
Timestamp:
Oct 30, 2020, 5:45:38 PM (15 months ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • sottopagina

    v2 v3  
    1 == sottopagina
    2 === Pisa Merda
     1= Trac FAQ
     2
     3Here you can find answers to some frequently asked questions about Trac.
     4
     5If 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.
     6
     7**Note:** If you don't find the answer you are looking for here and you are using Trac 0.12 or older versions, also have a look in the old [wiki:"0.12/TracFaq"].
     8
     9----
     10[[PageOutline(2-6,,inline)]]
     11----
     12
     13== What is Trac and how can it help me?
     14 
     15There's a list on TracFeatures.
     16
     17{{{#!comment
     18Maybe directly from [http://www.edgewall.com/trac/ Edgewall]. Sounds like we need a TracFeatures page. Just as a first cut at an outline:
     19 - Project description
     20 - open source
     21 - Integrated Wiki
     22 - Version control support (primary is Subversion, but now others)
     23 - Milestones and Roadmap
     24 - Ticketing
     25 - Reporting (custom and fixed complex ones)
     26 - Tight integration for cross links between different types of data
     27 - Extensible (see custom ticket fields, plugins, macros)
     28}}}
     29
     30== Installation troubleshooting
     31
     32=== Installation from source
     33
     34==== Q: Why do I get `NameError: global name 'log' is not defined` when trying to use `setup.py`?
     35
     36{{{#!sh
     37../trunk/$ python setup.py egg_info
     38running egg_info
     39...
     40  File "build/bdist.linux-x86_64/egg/setuptools/svn_util.py", line 55, in get_sections
     41NameError: global name 'log' is not defined
     42}}}
     43
     44**A:** You're most likely working from a Subversion **1.7** checkout and you're using a too old `setuptools` package, eg `/setuptools-0.7a1dev_r66608`. Upgrade to a newer setuptools, downgrade to svn 1.6.x, or use distribute. See also #7598.
     45
     46==== Q: Why does installing `distribute` fail with `ValueError: A 0.7-series setuptools cannot be installed with distribute.`?
     47
     48You tried to install `distribute` as advised elsewhere:
     49{{{#!sh
     50$ curl http://python-distribute.org/distribute_setup.py | python
     51}}}
     52
     53but you're greeted with:
     54{{{#!sh
     55ValueError: 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
     56}}}
     57
     58**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 and installing distribute should now work.
     59
     60==== Q: Why does Apache crash (500) with a `ZipImportError` in the error log?
     61
     62{{{
     63[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: http://dserver/trac/bct/timeline
     64...
     65[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
     66[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
     67}}}
     68
     69**A:** You probably 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.
     70
     71==== Q: Why do ticket notification emails contain unexpected backslash characters?
     72
     73You installed Trac from PyPI using `easy_install` or `pip`, along with Genshi 0.7. Your ticket notification emails have unexpected backslash characters (for an example, see #11572).
     74
     75**A:** This is the result of a defect in Genshi 0.7 (genshi:#569). Until Genshi 0.7.1 is released, your options are:
     76 * Use Trac 1.0.3 or later. The zip archive has been built on Linux rather than Windows since 1.0.3.
     77 * Downgrade to Genshi 0.6.1
     78 * Convert the line endings of the ticket notification email template from `CRLF` to `LF`. For example, on a Unix-like system you can run the following from the directory in which the egg is installed:
     79 {{{#!sh
     80$ dos2unix Trac-1.0.1-py2.7.egg/trac/ticket/templates/ticket_notify_email.txt
     81}}}
     82 You may need elevated privileges, and your egg may have a different name depending on your Trac and Python versions.
     83
     84==== Q: Why do I see `IndexError: pop from empty list` when trying to add an attachment?
     85
     86The issue is seen with Genshi 0.6.1 and 0.7 for languages other than English. The issue can be avoided by downgrading to Genshi 0.6 or upgrading to Genshi 0.7.1.
     87
     88=== Upgrade troubleshooting
     89
     90==== Q: Trac /about says 1.0, but the style looks pre-1.0
     91
     92**A:** You probably just need to convince your browser that the CSS files have changed. Try force reloading by entering `CTRL+R` or `CTRL+Shift+R`, depending on your browser. This is a common issue, see #10797.
     93
     94If 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 are serving them as static files from a different location:
     95{{{#!apache
     96Alias /trac/bct/chrome /packages/trac/virtualenv-0.13/share/htdocs
     97}}}
     98
     99In this case, don't forget to:
     100{{{#!sh
     101$ trac-admin <yourenv> deploy /packages/trac/virtualenv-0.13/share
     102}}}
     103
     104See TracUpgrade#a5.Refreshstaticresources.
     105
     106==== Q: Attachments are missing after upgrade
     107
     108**A:** Most likely db28.py failed. See #11370. Please report any additional information on the MailingList.
     109
     110If the attachments are not moved when upgrading your Trac instance, add the following code to `run-db28.py`:
     111{{{#!python
     112# -*- coding: utf-8 -*-
     113#
     114# Execute `do_upgrade` in trac/upgrades/db28.py
     115#
     116# Usage: python run-db28.py /path/to/tracenv
     117#
     118
     119from __future__ import with_statement
     120
     121from trac.env import Environment
     122from trac.upgrades import db28
     123
     124def main(args):
     125    for arg in args:
     126        env = Environment(arg)
     127        with env.db_transaction as db:
     128            cursor = db.cursor()
     129            db28.do_upgrade(env, 28, cursor)
     130
     131if __name__ == '__main__':
     132    import sys
     133    main(sys.argv[1:])
     134}}}
     135
     136Then run the script against the broken environment:
     137{{{#!sh
     138$ python run-db28.py /path/to/tracenv
     139}}}
     140
     141== Trac development
     142
     143=== Q: How to extend Trac?
     144
     145**A:** The primary way to extend Trac is to write [TracPlugins plugins] in Python. Look for the extensive documentation below TracDev/, maybe starting with the [TracDev#Overviews overview] pages. Also, we regularly migrate plugin functionality into Trac core, if that functionality is used often enough.
     146
     147The community site [TracHacks:WikiStart trac-hacks.org] is the portal where close to 1000 Trac plugins are hosted, and there is a [https://github.com/trac-hacks trac-hacks organization on GitHub]. It also contains a few [TracHacks:wiki:tutorial tutorials] to get you started.
     148 
     149=== Q: How to contribute to Trac?
     150
     151**A:** There are many ways to contribute back, see HowToContribute for details.
     152
     153Also have a look at the documentation below TracDev/, in particular the pages below the [TracDev#Contributing Contributing] section.