You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by x nooby <xn...@yahoo.com> on 2005/10/03 13:46:54 UTC

Python hookscipt confusion: "ImportError: No module named svn"

Hi,

I'm trying to use the "check-case-insensitive.py"
script on a Windows XP Subversion host. I am getting
an error "ImportError: No module named svn"


My complete error is:

E:\svntesting\acmepss\sales>svn ci zdate.hpp -m "test"
Sending        zdate.hpp
Transmitting file data .svn: Commit failed (details
follow):
svn: 'pre-commit' hook failed with error output:
Traceback (most recent call last):
  File "e:\svnrepo\hooks\check-case-insensitive.py",
line 66, in ?
    from svn import fs, core, repos, delta
ImportError: No module named svn
Error found in commit


I installed:

   Subversion 1.20
   Python 2.4
   PySVN for Python 2.4


My Python path is:

>>> import sys
>>> print sys.path
['', 'C:\\WINDOWS\\system32\\python24.zip',
'C:\\Python24', 'C:\\Python24\\DLLs',
'C:\\Python24\\lib','C:\\Python24\\lib\\plat-win',
'C:\\Python24\\lib\\lib-tk',
'C:\\Python24\\lib\\site-packages']


I've never used hook-scripts or Python before, so
maybe I am missing something simple.  

Any suggestions?


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Python hookscipt confusion: "ImportError: No module named svn"

Posted by Barry Scott <ba...@barrys-emacs.org>.
On Oct 3, 2005, at 14:46, x nooby wrote:

>
> Hi,
>
> I'm trying to use the "check-case-insensitive.py"
> script on a Windows XP Subversion host. I am getting
> an error "ImportError: No module named svn"
>
>
> My complete error is:
>
> E:\svntesting\acmepss\sales>svn ci zdate.hpp -m "test"
> Sending        zdate.hpp
> Transmitting file data .svn: Commit failed (details
> follow):
> svn: 'pre-commit' hook failed with error output:
> Traceback (most recent call last):
>   File "e:\svnrepo\hooks\check-case-insensitive.py",
> line 66, in ?
>     from svn import fs, core, repos, delta
> ImportError: No module named svn
> Error found in commit

You can write hook scripts using pysvn and its easy to do.
However the errors you are getting are from trying to use the
svn python bindings not pysvn.

Barry


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Python hookscipt confusion: "ImportError: No module named svn"

Posted by x nooby <xn...@yahoo.com>.
Hmm.

> I installed:
> 
>    Subversion 1.20
>    Python 2.4
>    PySVN for Python 2.4


The author of the script recently wrote:

"You need Python 2.3 (*not* 2.4)"

http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=39226

Should I uninstall Python 2.4, and re-install 2.3?

thx




		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Python hookscipt confusion: "ImportError: No module named svn"

Posted by x nooby <xn...@yahoo.com>.
I believe I have the "Python bindings", they installed
in the "site-packages" directory:

C:\Python24\Lib\site-packages\pysvn

In the mail-list-archive making sure the files are
there seemed to fix previous problems like mine, but I
still have the error.

Do I need to do anything more than the normal PySVN
install?



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Python hookscipt confusion: "ImportError: No module named svn" - solved

Posted by x nooby <xn...@yahoo.com>.
I am able to run the case-insensitivity Python script
on a Windows XP svnserver.  I had to add the correct
library path to the script:

SVNLIB_DIR =
r"C:/Python23/Lib/site-packages/svn-win32-1.2.3/python/"

I will write a more detailed solution and post it a
little bit later.

thanks!





		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org