449: problem with pysvn
- Fixed
- Review Board
| t**@alsop-fa******** (Google Code) (Is this you? Claim this profile.) | |
| May 18, 2008 |
I have a problem using svn with reviewboard, and it is due to pysvn. See
below for explanation:
What steps will reproduce the problem?
1. configure reviewboard for svn integration
2. compile pysvn
3. As described in pysvn INSTALL.html documentation, copy _pysvn_2.4.so to
/usr/lib64/python2.4/site-packages/_pysvn.so and copy __init__.py to
/usr/lib64/python2.4/site-packages/__init__.py
4. ./manage.py runserver
5. check output from manage.py and you will find:
Warning: pysvn not found. SVN integration will not work.
6. The error given is because the manage.py code is using
imp.find_module('pysvn') instead of imp.find_module('_pysvn'). I changed
manage.py to use import(_pysvn) and now when I issue runserver command I
don't get the warning message.
7. logon to reviewboard using browser
8. create a new review using option on dashboard, and an error appears:
Request Method: GET
Request URL: http://127.0.0.1:8000/r/new/
Exception Type: ImportError
Exception Value: dynamic module does not define init function (initpysvn)
Exception Location:
/home/talsop/reviewboard/reviewboard-trunk/reviewboard/scmtools/svn.py in
__init__, line 44
Python Executable: /usr/bin/python
Python Version: 2.4.3
9. From above it is clear that code is trying to call a function called
initpysvn. However, this function is not correct name, and should be called
init_pysvn.
10. I can therefore conclude that there seems to be somewhere else in code
where pysvn is used instead of _pysvn.
Are my assumptions correct, or have I done something wrong ? Can you
suggest a solution ?
It sounds like your pysvn installation was incorrect. pysvn is the correct package name, not _pysvn. It sounds like what you did is you put those files in the wrong directory. They should have gone in site-packages/pysvn/, not site-packages/. Create a pysvn directory in site-packages and move both of those files there.
Thankyou. It looks like I misread the pysvn documentation :-( Now, if I start RB using: ./manage.py runserver Then logon via browser and try to create a review - I get a new error: Exception Type: SystemError Exception Value: dynamic module not initialized properly Exception Location: /usr/lib64/python2.4/site-packages/pysvn/__init__.py in ?, line 101 Python Executable: /usr/bin/python Python Version: 2.4.3 Python Path: ['/opt', '/opt/reviewboard', '/usr/lib/python2.4/site-packages/setuptools-0.6c8-py2.4.egg', '/usr/lib/python2.4/site-packages/Trac-0.11dev_r6772-py2.4.egg', '/usr/lib/python2.4/site-packages/Genshi-0.4.4-py2.4.egg', '/usr/lib64/python24.zip', '/usr/lib64/python2.4', '/usr/lib64/python2.4/plat-linux2', '/usr/lib64/python2.4/lib-tk', '/usr/lib64/python2.4/lib-dynload', '/usr/lib64/python2.4/site-packages', '/usr/lib64/python2.4/site-packages/Numeric', '/usr/lib64/python2.4/site-packages/PIL', '/usr/lib64/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-packages'] Any ideas ?
I found the problem. I was using _pysvn.so instead of _pysvn_2_4.so. Now, pysvn is working and I can create a review. Thankyou for your help. I just need to make it work with Apache now ...
Now this issue is resolved - I cannot find a way to change it's status to Closed. Can somebody help me close this ?