It seems that this problem is really commun ... but I can't find any solution.
I'm on Debian Sarge, but using a hand compiled subversion-1.4.0, using the
Sarge version of Swig 1.3.24-1 and a hand installed version of Trac 0.10.4,
all with Python2.3.
I really don't understand how to solve my trouble ...
If I use the /usr/local/src/subversion-1.4.0/tools/examples/svnlook.py like
this :
#./svnlook.py /home/svn/males rev 1834 info
I get this :
herve
2007-11-02 20:22
92
Rewrite of a of the class gmap
So for me that's meen the python biding of svn is running no ?
So why I get this message using the trac-post-commit-hook script ?
#/usr/local/bin/trac-post-commit-hook --project=/home/httpd/htdocs/tracs/global/males --revision="beta1" --user="herve" --msg="test
timeline"
Traceback (most recent call last):
File "/usr/local/bin/trac-post-commit-hook", line 208, in ?
CommitHook()
File "/usr/local/bin/trac-post-commit-hook", line 142, in __init__
repos = self.env.get_repository()
File "/usr/lib/python2.3/site-packages/trac/env.py", line 216, in
get_repository
return RepositoryManager(self).get_repository(authname)
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/api.py", line 91,
in get_repository
raise TracError('Unsupported version control system "%s". '
trac.core.TracError: Unsupported version control system "svn". Check that the
Python bindings for "svn" are correctly installed.
My svn-python forlder is :
/usr/local/lib/svn-python/
#echo $PYTHONPATH
:/usr/local/lib/svn-python
Any help will be welcome ... I have tested Trac guidelines since 2 days now
without any result ...
Thanks,
--
Hervé Piedvache
To test the python bindings outside of trac, run:
python -c "from svn import core"
and it should not throw an error. If it does, there is a problem with
your bindings.
During an upgrade, I ran into binding problems when I upgraded
subversion. You mentioned you compiled subversion. Was there a
version in the path already? If so, try removing it or maybe you can
set the the explicit path in the trac.ini.
Hope this helps..
--jon
I assume the error message is at least clear enough?
Good, what you have to keep in mind is that Subversion has multiple targets.
One is the basic application, the others are for specific SWIG language
installs, e.g. install-swig-py. I think you missed that step.
--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
In every stone sleeps a crystal...
It was a genuine question, not some smart-alec comment.
>I have already done the install swig process ... in the root of subversion
>sources thanks. This not my solution ...
Are you 100% sure?
Does your Python installation directory (say /usr/local/lib/python2.5) have
libsvn and svn in its site-packages?
Can you:
$ python
>>> import svn
without any problems?
Yes, thanks so much for this king of answer, so could you please explain me
why the tools/example script gives with subversion called svnloop.py is
perfectly running ? Does this not clearly also mean than the python biding is
running perflectly ?
> Good, what you have to keep in mind is that Subversion has multiple
> targets. One is the basic application, the others are for specific SWIG
> language installs, e.g. install-swig-py. I think you missed that step.
I have already done the install swig process ... in the root of subversion
sources thanks. This not my solution ...
--
Hervé Piedvache
No error here ... but nothing display after the command anyway is it normal ?
> During an upgrade, I ran into binding problems when I upgraded
> subversion. You mentioned you compiled subversion. Was there a
> version in the path already? If so, try removing it or maybe you can
> set the the explicit path in the trac.ini.
Yes perfect was only this adding the path in the trac.ini file ... this point
is not mentioned on the http://trac.edgewall.org/wiki/TracSubversion !
Many thanks !
--
Hervé Piedvache
That's *your* PYTHONPATH. How are you running Trac though? Through
Apache? Directly via tracd? I suspect PYTHONPATH isn't reaching the
environment that needs it.
BTW, I always use .pth files for this:
echo /usr/local/lib/svn-python > /usr/lib/python/site-packages/svn.pth
You probably need to be root to do the above. Then you don't have to
worry about setting PYTHONPATH. Python will read the .pth and find the
location of the svn-python bindings.
-John
It would be interesting to add this command line to the Trac documentation:
http://trac.edgewall.org/wiki/TracSubversion#unsupported-vcs
Cheers,
Manu
> > Any help will be welcome ... I have tested Trac guidelines since 2 days now
> > without any result ...
>
> That's *your* PYTHONPATH. How are you running Trac though? Through
> Apache? Directly via tracd? I suspect PYTHONPATH isn't reaching the
> environment that needs it.
>
> BTW, I always use .pth files for this:
> echo /usr/local/lib/svn-python > /usr/lib/python/site-packages/svn.pth
>
> You probably need to be root to do the above. Then you don't have to
> worry about setting PYTHONPATH. Python will read the .pth and find the
> location of the svn-python bindings.
Diddling and fiddling with the locale settings (aka LANG env variable)
might also help.
YMMV.
-jsl
--
silence is foo
I've installed subversion and SWIG. I think I've got everything in
the right place:
$ which python
/usr/local/bin/python
$ python -V
Python 2.5.2
$ ls -l /usr/local/lib/svn-python/
total 8
drwxr-xr-x 2 root root 4096 Apr 23 15:24 libsvn
drwxr-xr-x 2 root root 4096 Apr 23 15:24 svn
$ cat /usr/local/lib/python2.5/site-packages/svn.pth
/usr/local/lib/svn-python
$ echo $PYTHONPATH
:/usr/local/lib/svn-python/
$ python -c "from svn import core"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/svn-python/svn/core.py", line 19, in <module>
from libsvn.core import *
File "/usr/local/lib/svn-python/libsvn/core.py", line 5, in <module>
import _core
ImportError: /usr/local/lib/libsvn_ra_dav-1.so.0: undefined symbol:
gss_delete_sec_context
I guess I'm just not sure what the error means or how to remedy it.
What's the known fix for this?
Thanks,
Sean
Sean Hussey wrote:
> I'm sorry to dredge up an old and common issue, but I don't see my
> situation covered in the docs.
> ...
> ImportError: /usr/local/lib/libsvn_ra_dav-1.so.0: undefined symbol:
> gss_delete_sec_context
>
> I guess I'm just not sure what the error means or how to remedy it.
> What's the known fix for this?
>
Please have a look at
http://trac.edgewall.org/wiki/TracSubversion#ra_dav-undefined-symbol
-- Christian
Thanks for the help!
Sean