Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 17 years ago

#2055 closed task (invalid)

Timeline and Browse Source... No module named svn (modules ARE installed)

Reported by: matt.t.galvin@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: version control/browser Version: 0.9b1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Matthew Good)

I have gotten everything installed and configured. the trac-admin … initenv can see the svn modules (or else the install would not even work). I can view and use the wiki. When I try to use the Timeline or Browse Source I receive the following error message.

—- snip —-

Trac detected an internal error:
    No module named svn

Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/web/cgi_frontend.py", line 115, in run
    dispatch_request(req.path_info, req, env)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.4/site-packages/trac/Timeline.py", line 137, in process_request
    filters)
  File "/usr/local/lib/python2.4/site-packages/trac/versioncontrol/web_ui/changeset.py", line 106, in get_timeline_events
    repos = self.env.get_repository()
  File "/usr/local/lib/python2.4/site-packages/trac/env.py", line 143, in get_repository
    from trac.versioncontrol.svn_fs import SubversionRepository
  File "/usr/local/lib/python2.4/site-packages/trac/versioncontrol/svn_fs.py", line 26, in ?
    from svn import fs, repos, core, delta
ImportError: No module named svn

—- snip —-

System Specs (with custom builds of all the deps):

  • RHEL 3
  • Python 2.4.1
  • Apache 2
  • Subversion 1.2.3

PYTHON_SITE=/usr/local/lib/python2.4/site-packages PYTHONPATH=/usr/local/lib/svn-python/libsvn:/usr/local/lib/svn-python/svn:/usr/local/lib/svn-python

(this is where svn installs it modules now, i could not get them to install into the sitedir)

Please let me know if there is anyother information I can provide that might be helpful.

Attachments (0)

Change History (8)

comment:1 by Matthew Good, 19 years ago

Description: modified (diff)
Milestone: 0.9
Resolution: invalid
Status: newclosed

This is an installation support issue, not a Trac bug, so please ask on the IrcChannel or MailingList if you need help resolving this.

comment:2 by Matthew Good, 19 years ago

Well, since the trac-admin command worked it appears that you have the PYTHONPATH variable set on the commandline, but not in your Apache config. You will need to use the Apache config option "SetEnv" to configure the PYTHONPATH variable for the Trac application.

comment:3 by Christopher Lenz, 19 years ago

As you noted, the Subversion Python bindings are not installed to default location. You need to make them available to Python scripts yourself. There are two ways to do this:

  1. Create a .pth file in site-packages:
    $ echo /usr/local/lib/svn-python > /usr/local/lib/python2.4/site-packages
    
  2. Use symlinks:
     $ ln -s /usr/local/lib/svn-python/svn /usr/local/lib/python2.4/site-packages/svn
     $ ln -s /usr/local/lib/svn-python/libsvn /usr/local/lib/python2.4/site-packages/libsvn
    

comment:4 by Christopher Lenz, 19 years ago

That first snippet above should've been:

$ echo /usr/local/lib/svn-python > /usr/local/lib/python2.4/site-packages/svn.pth

comment:5 by matt.t.galvin@…, 19 years ago

I wound up symlinking to the dir with:

ln -s /usr/local/lib/svn-python/svn /usr/local/lib/python2.4/site-packages/svn ln -s /usr/local/lib/svn-python/libsvn /usr/local/lib/python2.4/site-packages/libsvn

which caused it to not be able to find libsvn_swig_py-1.so.0.

I then just re-ran ldconfig and then it worked.

So symlinking and running ldconfig worked for me.

Thanks for the tip and sorry for the noise.

comment:6 by anonymous, 19 years ago

Type: defecttask

Here's an echo command that will indeed create the .pth file mentioned above. $ echo "/usr/local/lib/svn-python" > /usr/local/lib/python2.4/site- packages/svn-python.pth

comment:7 by reinaldo@…, 18 years ago

estou com problemas esta dando o erro no trac de

Failed to create environment. You need to install mxDateTime

aquardo retorno

comment:8 by Emmanuel Blot, 17 years ago

(changes made by 'chandans@…' removed, as unrelated to this ticket)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.