Edgewall Software

Ticket #3943 (closed defect: worksforme)

Opened 2 years ago

Last modified 4 months ago

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

  Changed 2 years ago by cboos

  • description modified (diff)

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.

  Changed 2 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?

  Changed 2 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)

  Changed 2 years ago by av@…

OK, I think you hit on something here, but I'm kinda ignorant: ---

from svn import core (core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO)

(1, 1, 4) --- So I've got a problem, but *how* do I make sure they are in my python path?

Thanks in advance.

  Changed 2 years ago by cboos

  • status changed from new to closed
  • resolution set to worksforme

  Changed 20 months ago by anonymous

Can someone update on how to solve the issue?

  Changed 20 months 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.

  Changed 17 months 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.

follow-up: ↓ 10   Changed 17 months ago by cboos

in reply to: ↑ 9 ; follow-up: ↓ 11   Changed 16 months ago by anonymous

Replying to cboos:

See TracSubversion#BuildingSubversion.

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

in reply to: ↑ 10   Changed 16 months 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?

See TracSubversion#ra_dav-undefined-symbol

  Changed 4 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.

Add/Change #3943 (repository initialization error)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.