Ticket #3943 (closed defect: worksforme)
repository initialization error
| Reported by: | groome@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | general | Version: | 0.10 |
| Severity: | major | Keywords: | |
| Cc: |
Description (last modified by cboos) (diff)
When creating a new repository & Trac Project the following error occurs:
Failed to initialize environment. ("Expected version '3' of repository; found version '5'", 165005)
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/trac/scripts/admin.py", line 616, in do_initenv
repos = self.__env.get_repository()
File "/usr/lib/python2.3/site-packages/trac/env.py", line 162, in get_repository
repos = SubversionRepository(repos_dir, authz, self.log)
File "/usr/lib/python2.3/site-packages/trac/versioncontrol/svn_fs.py", line 192, in __init__
self.repos = repos.svn_repos_open(self.path, self.pool())
SubversionException: ("Expected version '3' of repository; found version '5'", 165005)
Exception exceptions.AttributeError: "'SubversionRepository' object has no attribute 'log'" in <bound method SubversionRepository.__del__ of <trac.versioncontrol.svn_fs.SubversionRepository object at 0xb791e5ac>> ignored
System versions:
uboat:~# svn --version svn, version 1.4.0 (r21228) compiled Sep 12 2006, 15:04:31 Copyright (C) 2000-2006 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/). The following repository access (RA) modules are available: * ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol. - handles 'http' scheme - handles 'https' scheme * ra_svn : Module for accessing a repository using the svn network protocol. - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - handles 'file' scheme
trac-0.9.6
Attachments
Change History
comment:2 Changed 3 years ago by av@…
I am having exactly the same issue. Tried for SVN dir: $ make swig-py $ make install-swig-py. Is there something else to be to ensure the bindings are current?
comment:3 Changed 3 years ago by cboos
Yes, make sure they are in your python path, i.e.
$ python ... >>> from svn import core >>> (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO) (1, 4, 0)
comment:4 Changed 3 years ago by av@…
OK, I think you hit on something here, but I'm kinda ignorant: ---
(1, 1, 4) --- So I've got a problem, but *how* do I make sure they are in my python path?from svn import core (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO)
Thanks in advance.
comment:5 Changed 3 years ago by cboos
- Status changed from new to closed
- Resolution set to worksforme
Look at the last bullet point in http://trac.edgewall.org/wiki/TracSubversion#BuildingSubversion
comment:7 Changed 3 years ago by cboos
In addition to all that already been said in this ticket (please make sure you've read all of the answers above), see: TracSubversion#Checklist. By following the tips there, you'll discover which bindings are currently in use and therefore what should be replaced by the correct version of the bindings.
comment:8 Changed 2 years ago by anonymous
So for all us rookies out there... how do you go about fixing this problem exactly. I have tried to follow the comments and perform the steps but I am having no luck. How do I change the PYTHONPATH? I know what version of svnserve I am running and by using the python commands in the checklist I know that my bindings are incorrect. I tried to recompile and install them but I did not have any luck. I think I just need to change the PYTHONPATH to point to svn-python but I don't know how and I don't know where it is.
comment:10 in reply to: ↑ 9 ; follow-up: ↓ 11 Changed 2 years ago by anonymous
Replying to cboos:
If I do:
#export PYTHONPATH=$PYTHONPATH:/usr/local/lib/svn-python
Then this happens when I run this:
# python
Python 2.4.4c1 (#2, Oct 11 2006, 20:00:03)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from svn import core
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/svn-python/svn/core.py", line 19, in ?
from libsvn.core import *
File "/usr/local/lib/svn-python/libsvn/core.py", line 5, in ?
import _core
ImportError: /usr/local/lib/libsvn_ra_dav-1.so.0: undefined symbol: GSS_C_NT_HOSTBASED_SERVICE
>>>
Now What? I compiled everything per the directions from TracSubversion and the INSTALL file located in the bindings directory.
Versions:
svn version 1.4.3
tracd 0.10.4
SWIG Version 1.3.31
svn-python were compiled from svn 1.4.3 source
comment:11 in reply to: ↑ 10 Changed 2 years ago by cboos
Replying to anonymous:
ImportError: /usr/local/lib/libsvn_ra_dav-1.so.0: undefined symbol: GSS_C_NT_HOSTBASED_SERVICE Now What?
comment:12 Changed 17 months ago by anonymous
In my case I created the repository in a newer version of SVN, via VisualSVN. Repository was using 1.5.x, Trac 10.5 used 1.4.6. I simply installed an older version of VisualSVN and created the repository with that, and all was happy.



Looks like you created the repo with svn 1.4.0, but the bindings are older. Can you check and try to update the Subversion bindings?
See TracSubversion for additional troubleshooting information.