You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brian Ellis <be...@ticketbiscuit.com> on 2011/02/15 20:39:58 UTC

Python SVN Bindings on Windows Server 2008 x64

Hi, sorry if this has been covered before but I'm new to Subversion admin
and can't really find a clear answer.  My goal is to use the python scripts
in subversion\tools, specifically validate-extensions.py in this case.  I am
running VisualSVN Server 2.15, built on Subversion 1.6.15 and have 32-bit
Python 2.7.1 set up on the machine at the moment.

When I set up the hook, I got an error that the svn module could not be
found.  I installed the latest libsvn bindings I could find (
http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-win32-1.6.15_py_2.7.zipfrom
http://trac.edgewall.org/wiki/TracSubversion) but I still can't load the svn
module.  If I run 'from svn import repos' from the command line, I get:

*File "C:\Python27\lib\site-packages\libsvn\core.py", line 21, in
swig_import_helper
_mod = imp.load_module('_core', fp, pathname, description)
ImportError: DLL load failed: The specified procedure could not be found.
*

Am I missing something?  I also tried the Python27 64-bit release but
precompiled svn bindings don't appear to be available for it and I would
prefer not to go through everything required to build them myself.

Thank you in advance for your help.

Brian Ellis

Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
Joel, as far as I know I have it set up correctly.  I have added
VisualSvn\bin to my Windows Path environment variable and I can execute svn
from anywhere on the command line with no problems.

Mark, I tried the trick with renaming the .pyd -> .dll files and had no luck
with it.  I did not restart the server though.  I can try again and reboot
the server later today.
____________________________________
Brian Ellis
TicketBiscuit, LLC
415.602.6230 (mobile)
205.259.2300 (office)
205.985.6160 (fax)

Email: bellis@ticketbiscuit.com
www.ticketbiscuit.com



On Tue, Feb 15, 2011 at 6:11 PM, Joel Low <jo...@joelsplace.sg> wrote:

> *From:* Brian Ellis [mailto:bellis@ticketbiscuit.com]
> *Sent:* Wednesday, 16 February, 2011 3:40 AM
> *To:* users@subversion.apache.org
> *Subject:* Python SVN Bindings on Windows Server 2008 x64
>
>
>
> Hi, sorry if this has been covered before but I'm new to Subversion admin
> and can't really find a clear answer.  My goal is to use the python scripts
> in subversion\tools, specifically validate-extensions.py in this case.  I am
> running VisualSVN Server 2.15, built on Subversion 1.6.15 and have 32-bit
> Python 2.7.1 set up on the machine at the moment.
>
> When I set up the hook, I got an error that the svn module could not be
> found.  I installed the latest libsvn bindings I could find (
> http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-win32-1.6.15_py_2.7.zipfrom
> http://trac.edgewall.org/wiki/TracSubversion) but I still can't load the
> svn module.  If I run 'from svn import repos' from the command line, I get:
>
> *File "C:\Python27\lib\site-packages\libsvn\core.py", line 21, in
> swig_import_helper
> _mod = imp.load_module('_core', fp, pathname, description)
> ImportError: DLL load failed: The specified procedure could not be found.*
>
>
> Am I missing something?  I also tried the Python27 64-bit release but
> precompiled svn bindings don't appear to be available for it and I would
> prefer not to go through everything required to build them myself.
>
> Thank you in advance for your help.
>
> Brian Ellis
>
> *[JL] Hi Brian, you can try to check if the SVN DLLs are accessible from
> your 32-bit Python (so 32-bit SVN DLLs, Program Files (x86) folder, etc),
> perhaps by ensuring that the Subversion bin directory is in PATH. Remember
> that hook scripts are run without environment variables defined so you may
> have to redefine PATH in your hook script.*
>

Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
Joel, sorry if it I wasn't clear.  While troubleshooting, I've taken the
hook completely out of the mix.  I'm simple opening a command prompt,
running the python.exe interpreter, running 'from svn import repos' and
receiving the original error - *'_mod = imp.load_module('_core', fp,
pathname, description) ImportError: DLL load failed: The specified procedure
could not be found.*
____________________________________
Brian Ellis
TicketBiscuit, LLC
415.602.6230 (mobile)
205.259.2300 (office)
205.985.6160 (fax)

Email: bellis@ticketbiscuit.com
www.ticketbiscuit.com



On Wed, Feb 16, 2011 at 3:55 PM, Joel Low <jo...@joelsplace.sg> wrote:

>
>
> *From:* Brian Ellis [mailto:bellis@ticketbiscuit.com]
> *Sent:* Thursday, 17 February, 2011 1:28 AM
> *To:* Cooke, Mark
> *Cc:* Joel Low; users@subversion.apache.org
> *Subject:* Re: Python SVN Bindings on Windows Server 2008 x64
>
>
>
> Joel, as far as I know I have it set up correctly.  I have added
> VisualSvn\bin to my Windows Path environment variable and I can execute svn
> from anywhere on the command line with no problems.
>
> *[JL] Hey Brian,
> As I’ve mentioned, the usual gotcha is that hook scripts run without
> environment variables, even PATH is set empty. An explicit path needs to be
> set.*
>
> Mark, I tried the trick with renaming the .pyd -> .dll files and had no
> luck with it.  I did not restart the server though.  I can try again and
> reboot the server later today.
> ____________________________________
> Brian Ellis
> TicketBiscuit, LLC
> 415.602.6230 (mobile)
> 205.259.2300 (office)
> 205.985.6160 (fax)
>
> Email: bellis@ticketbiscuit.com
> www.ticketbiscuit.com
>
>
> On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark <ma...@siemens.com>
> wrote:
>
> > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> > Sent: Wednesday, 16 February, 2011 3:40 AM
> > To: users@subversion.apache.org
> > Subject: Python SVN Bindings on Windows Server 2008 x64
> >
> > Hi, sorry if this has been covered before but I'm new to
> > Subversion admin and can't really find a clear answer.  My
> > goal is to use the python scripts in subversion\tools,
> > specifically validate-extensions.py in this case.  I am
> > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> > have 32-bit Python 2.7.1 set up on the machine at the moment.
> >
> > When I set up the hook, I got an error that the svn module
> > could not be found.  I installed the latest libsvn bindings I
> > could find
> > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> in32-1.6.15_py_2.7.zip<http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w%0Ain32-1.6.15_py_2.7.zip>from
> http://trac.edgewall.org/wiki/TracSubversion) > but I still can't load
> the svn module.  If I run 'from svn
> > import repos' from the command line, I get:
> >
> > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> > in swig_import_helper
> > _mod = imp.load_module('_core', fp, pathname, description)
> > ImportError: DLL load failed: The specified procedure could
> > not be found.
> >
> >
> > Am I missing something?  I also tried the Python27 64-bit
> > release but precompiled svn bindings don't appear to be
> > available for it and I would prefer not to go through
> > everything required to build them myself.
> >
> > Thank you in advance for your help.
> >
> > Brian Ellis
> >
> > -----Original Message-----
> > From: Joel Low [mailto:joel@joelsplace.sg]
> > Sent: 16 February 2011 00:11
> > To: Brian Ellis
> > Cc: users@subversion.apache.org
> > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> >
> > [JL] Hi Brian, you can try to check if the SVN DLLs are
> > accessible from your 32-bit Python (so 32-bit SVN DLLs,
> > Program Files (x86) folder, etc), perhaps by ensuring that
> > the Subversion bin directory is in PATH. Remember that hook
> > scripts are run without environment variables defined so you
> > may have to redefine PATH in your hook script.
> >
> Hi Brian,
>
> Here are some notes I made for myself about upgrading the bindings when
> I upgrade Trac:
>
> ~ deleted the old svn and libsvn directories from
> C:\Python26\Lib\site-packages
>
> ~ opened the python bindings .zip and copied the two directories
>  to site-packages
>
> ~ copied all libsvn\_*.dll files to _*.pyd [1]
>
> ~ restarted the server and crossed fingers...
>
> [1] I found this recommended in the t.e.o wiki at TracSubversion...
>    http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
>
> ...in particular have you copied/renamed the .dll files?  Hope this
> helps...
>
> ~ Mark C
>
>
>

RE: Python SVN Bindings on Windows Server 2008 x64

Posted by Joel Low <jo...@joelsplace.sg>.
 

From: Brian Ellis [mailto:bellis@ticketbiscuit.com] 
Sent: Thursday, 17 February, 2011 1:28 AM
To: Cooke, Mark
Cc: Joel Low; users@subversion.apache.org
Subject: Re: Python SVN Bindings on Windows Server 2008 x64

 

Joel, as far as I know I have it set up correctly.  I have added
VisualSvn\bin to my Windows Path environment variable and I can execute svn
from anywhere on the command line with no problems.

[JL] Hey Brian,
As I've mentioned, the usual gotcha is that hook scripts run without
environment variables, even PATH is set empty. An explicit path needs to be
set.

Mark, I tried the trick with renaming the .pyd -> .dll files and had no luck
with it.  I did not restart the server though.  I can try again and reboot
the server later today.
____________________________________
Brian Ellis
TicketBiscuit, LLC
415.602.6230 (mobile)
205.259.2300 (office)
205.985.6160 (fax)

Email: bellis@ticketbiscuit.com
www.ticketbiscuit.com




On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark <ma...@siemens.com> wrote:

> From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> Sent: Wednesday, 16 February, 2011 3:40 AM
> To: users@subversion.apache.org
> Subject: Python SVN Bindings on Windows Server 2008 x64
>
> Hi, sorry if this has been covered before but I'm new to
> Subversion admin and can't really find a clear answer.  My
> goal is to use the python scripts in subversion\tools,
> specifically validate-extensions.py in this case.  I am
> running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> have 32-bit Python 2.7.1 set up on the machine at the moment.
>
> When I set up the hook, I got an error that the svn module
> could not be found.  I installed the latest libsvn bindings I
> could find
> (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
<http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w%0Ain32-1.6.15
_py_2.7.zip> 
in32-1.6.15_py_2.7.zip from
http://trac.edgewall.org/wiki/TracSubversion) > but I still can't load
the svn module.  If I run 'from svn
> import repos' from the command line, I get:
>
> File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> in swig_import_helper
> _mod = imp.load_module('_core', fp, pathname, description)
> ImportError: DLL load failed: The specified procedure could
> not be found.
>
>
> Am I missing something?  I also tried the Python27 64-bit
> release but precompiled svn bindings don't appear to be
> available for it and I would prefer not to go through
> everything required to build them myself.
>
> Thank you in advance for your help.
>
> Brian Ellis
>
> -----Original Message-----
> From: Joel Low [mailto:joel@joelsplace.sg]
> Sent: 16 February 2011 00:11
> To: Brian Ellis
> Cc: users@subversion.apache.org
> Subject: RE: Python SVN Bindings on Windows Server 2008 x64
>
> [JL] Hi Brian, you can try to check if the SVN DLLs are
> accessible from your 32-bit Python (so 32-bit SVN DLLs,
> Program Files (x86) folder, etc), perhaps by ensuring that
> the Subversion bin directory is in PATH. Remember that hook
> scripts are run without environment variables defined so you
> may have to redefine PATH in your hook script.
>
Hi Brian,

Here are some notes I made for myself about upgrading the bindings when
I upgrade Trac:

~ deleted the old svn and libsvn directories from
C:\Python26\Lib\site-packages

~ opened the python bindings .zip and copied the two directories
 to site-packages

~ copied all libsvn\_*.dll files to _*.pyd [1]

~ restarted the server and crossed fingers...

[1] I found this recommended in the t.e.o wiki at TracSubversion...
   http://trac.edgewall.org/wiki/TracSubversion#forPython2.6

...in particular have you copied/renamed the .dll files?  Hope this
helps...

~ Mark C

 


Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
Joel, as far as I know I have it set up correctly.  I have added
VisualSvn\bin to my Windows Path environment variable and I can execute svn
from anywhere on the command line with no problems.

Mark, I tried the trick with renaming the .pyd -> .dll files and had no luck
with it.  I did not restart the server though.  I can try again and reboot
the server later today.
____________________________________
Brian Ellis
TicketBiscuit, LLC
415.602.6230 (mobile)
205.259.2300 (office)
205.985.6160 (fax)

Email: bellis@ticketbiscuit.com
www.ticketbiscuit.com



On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark <ma...@siemens.com> wrote:

> > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> > Sent: Wednesday, 16 February, 2011 3:40 AM
> > To: users@subversion.apache.org
> > Subject: Python SVN Bindings on Windows Server 2008 x64
> >
> > Hi, sorry if this has been covered before but I'm new to
> > Subversion admin and can't really find a clear answer.  My
> > goal is to use the python scripts in subversion\tools,
> > specifically validate-extensions.py in this case.  I am
> > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> > have 32-bit Python 2.7.1 set up on the machine at the moment.
> >
> > When I set up the hook, I got an error that the svn module
> > could not be found.  I installed the latest libsvn bindings I
> > could find
> > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> in32-1.6.15_py_2.7.zip from
> http://trac.edgewall.org/wiki/TracSubversion) > but I still can't load
> the svn module.  If I run 'from svn
> > import repos' from the command line, I get:
> >
> > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> > in swig_import_helper
> > _mod = imp.load_module('_core', fp, pathname, description)
> > ImportError: DLL load failed: The specified procedure could
> > not be found.
> >
> >
> > Am I missing something?  I also tried the Python27 64-bit
> > release but precompiled svn bindings don't appear to be
> > available for it and I would prefer not to go through
> > everything required to build them myself.
> >
> > Thank you in advance for your help.
> >
> > Brian Ellis
> >
> > -----Original Message-----
> > From: Joel Low [mailto:joel@joelsplace.sg]
> > Sent: 16 February 2011 00:11
> > To: Brian Ellis
> > Cc: users@subversion.apache.org
> > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> >
> > [JL] Hi Brian, you can try to check if the SVN DLLs are
> > accessible from your 32-bit Python (so 32-bit SVN DLLs,
> > Program Files (x86) folder, etc), perhaps by ensuring that
> > the Subversion bin directory is in PATH. Remember that hook
> > scripts are run without environment variables defined so you
> > may have to redefine PATH in your hook script.
> >
> Hi Brian,
>
> Here are some notes I made for myself about upgrading the bindings when
> I upgrade Trac:
>
> ~ deleted the old svn and libsvn directories from
> C:\Python26\Lib\site-packages
>
> ~ opened the python bindings .zip and copied the two directories
>  to site-packages
>
> ~ copied all libsvn\_*.dll files to _*.pyd [1]
>
> ~ restarted the server and crossed fingers...
>
> [1] I found this recommended in the t.e.o wiki at TracSubversion...
>    http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
>
> ...in particular have you copied/renamed the .dll files?  Hope this
> helps...
>
> ~ Mark C
>

Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
Okay, that was a great tip Joel.  I researched it a bit and that seems to be
the same issue others have had in the past (see
http://trac.edgewall.org/ticket/6739).

>From what I can tell, VisualSVN (and thus Apache) ships with a later copy of
libapr-1.dll where '_apr_time_ansi_put@8' has been renamed to
'_apr_time_ansi_put@12', but the Python 2.7 bindings I have from
http://trac.edgewall.org/wiki/TracSubversion were built with the old version
of libapr-1.dll, where it is still '_apr_time_ansi_put@8'.

So, I downloaded the old Apache bindings from
http://subversion.tigris.org/files/documents/15/47914/svn-win32-1.6.6.zip,
renamed the VisualSVN\bin\libapr-1.dll to libapr-1.dll.bak, copied the older
libapr-1.dll to the VisualSVN\bin folder and restarted the service.  No more
issues, python 'from svn import core' works fine and the
validate-extensions.py hook is running correctly.

Thanks for all of your help (you too Mark)!
____________________________________
Brian Ellis


On Thu, Feb 17, 2011 at 7:57 AM, Joel Low <jo...@joelsplace.sg> wrote:

> Hi Brian,
>
>
>
> The other possible problem I can think of now is that you’ve got a few
> different variants of libapr[|util|iconv] built under different compilers
> all accessible from PATH but are binary incompatible with each other. Such a
> circumstance can result from using binaries built by different people (the
> one that bit me was Apache.org HTTPD built using vc6 and a custom build of
> SVN using vc9.) Dependency walker should tell you which functions are
> missing; perhaps you could include them, if it is not too many?
>
>
>
> *From:* Brian Ellis [mailto:bellis@ticketbiscuit.com]
> *Sent:* Thursday, 17 February, 2011 9:52 PM
> *To:* Cooke, Mark
> *Cc:* users@subversion.apache.org
> *Subject:* Re: Python SVN Bindings on Windows Server 2008 x64
>
>
>
> Yeah, I copied the files and renamed them so I have both the .dll and .pyd
> files in the directory.  I also rebooted the server, though I'm not sure why
> that would matter.  Still no luck :(
> ____________________________________
> Brian Ellis
>
> On Thu, Feb 17, 2011 at 1:11 AM, Cooke, Mark <ma...@siemens.com>
> wrote:
>
> >       > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> >       > Sent: Wednesday, 16 February, 2011 3:40 AM
> >       > To: users@subversion.apache.org
> >       > Subject: Python SVN Bindings on Windows Server 2008 x64
> >       >
> >       > Hi, sorry if this has been covered before but I'm new to
> >       > Subversion admin and can't really find a clear answer.  My
> >       > goal is to use the python scripts in subversion\tools,
> >       > specifically validate-extensions.py in this case.  I am
> >       > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> >       > have 32-bit Python 2.7.1 set up on the machine at the moment.
> >       >
> >       > When I set up the hook, I got an error that the svn module
> >       > could not be found.  I installed the latest libsvn bindings I
> >       > could find
> >       > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> >       in32-1.6.15_py_2.7.zip
> > <http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> > %0Ain32-1.6.15_py_2.7.zip>  from
> >       http://trac.edgewall.org/wiki/TracSubversion) > but I
> > still can't load
> >       the svn module.  If I run 'from svn
> >       > import repos' from the command line, I get:
> >       >
> >       > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> >       > in swig_import_helper
> >       > _mod = imp.load_module('_core', fp, pathname, description)
> >       > ImportError: DLL load failed: The specified procedure could
> >       > not be found.
> >       >
> >       >
> >       > Am I missing something?  I also tried the Python27 64-bit
> >       > release but precompiled svn bindings don't appear to be
> >       > available for it and I would prefer not to go through
> >       > everything required to build them myself.
> >       >
> >       > Thank you in advance for your help.
> >       >
> >       > Brian Ellis
> >       >
> >       > -----Original Message-----
> >       > From: Joel Low [mailto:joel@joelsplace.sg]
> >       > Sent: 16 February 2011 00:11
> >       > To: Brian Ellis
> >       > Cc: users@subversion.apache.org
> >       > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> >       >
> >       > [JL] Hi Brian, you can try to check if the SVN DLLs are
> >       > accessible from your 32-bit Python (so 32-bit SVN DLLs,
> >       > Program Files (x86) folder, etc), perhaps by ensuring that
> >       > the Subversion bin directory is in PATH. Remember that hook
> >       > scripts are run without environment variables defined so you
> >       > may have to redefine PATH in your hook script.
> >       >
> > On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark
> > <ma...@siemens.com> wrote:
> >
> >       Hi Brian,
> >
> >       Here are some notes I made for myself about upgrading
> > the bindings when
> >       I upgrade Trac:
> >
> >       ~ deleted the old svn and libsvn directories from
> >       C:\Python26\Lib\site-packages
> >
> >       ~ opened the python bindings .zip and copied the two directories
> >        to site-packages
> >
> >       ~ copied all libsvn\_*.dll files to _*.pyd [1]
> >
> >       ~ restarted the server and crossed fingers...
> >
> >       [1] I found this recommended in the t.e.o wiki at
> > TracSubversion...
> >          http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
> >
> >       ...in particular have you copied/renamed the .dll
> > files?  Hope this
> >       helps...
> >
> >       ~ Mark C
> >
> > -----Original Message-----
> > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> > Sent: 16 February 2011 23:26
> > To: Cooke, Mark
> > Cc: Joel Low; users@subversion.apache.org
> > Subject: Re: Python SVN Bindings on Windows Server 2008 x64
> >
> > In case it helps, I loaded up the 32-bit depends.exe as
> > recommended in the TracSubversion FAQ and tried the load the
> > core module from there ('from svn import core').  I receive the error:
> >
> > LoadLibraryExA("C:\Python27\Lib\site-packages\libsvn\_core.pyd
> > ", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL.
> > Error: The specified procedure could not be found (127).
> >
> > _core.pyd is located at that path so I'm not sure why it
> > can't find it.
> > ____________________________________
> > Brian Ellis
> >
> I'm clutching at straws here but did you rename the files or copy/rename
> them?  I.e. do you just .pyd or both .pyd and .dll?  If the former, try
> copying back to .dll as well (this is what I have).  You will need to
> bounce apache (if you are using it)...  The information I could find
> when I was looking into this was somewhat confused but I seem to
> remember I had very similar problems with only one or the other that
> were fixed when I kept both.
>
> Just checking the Trac site again
> (http://trac.edgewall.org/wiki/TracSubversion#checklist-windows) I
> remember reading this before:
>
>  According to the README.txt file for the Subversion bindings, if you
> are using Python 2.5+ you need to rename all the .dll files in the
> libsvn folder to .pyd files. Upon further research,
> http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll
> indicates you may need to have both the .pyd and .dll version of the
> libsvn files available. This resolved both the 'ImportError: No module
> named _core' error (with only the DLL) and the 'ImportError: DLL load
> failed' (with only the pyd) when testing from the console, and the
> browser.
>
> ...I hope this fixes it!
>
> ~ mark c
>
>
>

Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
Joel,

I don't have a lot of experience with depends.exe but if I am reading it
correctly, it shows LIBAPR-1.DLL is missing _apr_time_ansi_put@8.

It shows tree on the left with _CORE.PYD in red.
Under that, LIBAPR-1.DLL is in red.
If I click LIBAPR-1.DLL, all of the functions have a green square under PI
except for _apr_time_ansi_put@8.

Also, the next item in the tree is LIBSVN_SWIG_PY-1.DLL and it has a yellow
question mark next to it.  libsvn_swig_py-1.dll is in the same directory as
_core.pyd and _core.dll (C:\Python27\Lib\site-packages\libsvn) so I'm not
sure why that would be missing.
____________________________________
Brian Ellis

On Thu, Feb 17, 2011 at 7:57 AM, Joel Low <jo...@joelsplace.sg> wrote:

> Hi Brian,
>
>
>
> The other possible problem I can think of now is that you’ve got a few
> different variants of libapr[|util|iconv] built under different compilers
> all accessible from PATH but are binary incompatible with each other. Such a
> circumstance can result from using binaries built by different people (the
> one that bit me was Apache.org HTTPD built using vc6 and a custom build of
> SVN using vc9.) Dependency walker should tell you which functions are
> missing; perhaps you could include them, if it is not too many?
>
>
>
> *From:* Brian Ellis [mailto:bellis@ticketbiscuit.com]
> *Sent:* Thursday, 17 February, 2011 9:52 PM
> *To:* Cooke, Mark
> *Cc:* users@subversion.apache.org
> *Subject:* Re: Python SVN Bindings on Windows Server 2008 x64
>
>
>
> Yeah, I copied the files and renamed them so I have both the .dll and .pyd
> files in the directory.  I also rebooted the server, though I'm not sure why
> that would matter.  Still no luck :(
> ____________________________________
> Brian Ellis
>
> On Thu, Feb 17, 2011 at 1:11 AM, Cooke, Mark <ma...@siemens.com>
> wrote:
>
> >       > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> >       > Sent: Wednesday, 16 February, 2011 3:40 AM
> >       > To: users@subversion.apache.org
> >       > Subject: Python SVN Bindings on Windows Server 2008 x64
> >       >
> >       > Hi, sorry if this has been covered before but I'm new to
> >       > Subversion admin and can't really find a clear answer.  My
> >       > goal is to use the python scripts in subversion\tools,
> >       > specifically validate-extensions.py in this case.  I am
> >       > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> >       > have 32-bit Python 2.7.1 set up on the machine at the moment.
> >       >
> >       > When I set up the hook, I got an error that the svn module
> >       > could not be found.  I installed the latest libsvn bindings I
> >       > could find
> >       > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> >       in32-1.6.15_py_2.7.zip
> > <http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> > %0Ain32-1.6.15_py_2.7.zip>  from
> >       http://trac.edgewall.org/wiki/TracSubversion) > but I
> > still can't load
> >       the svn module.  If I run 'from svn
> >       > import repos' from the command line, I get:
> >       >
> >       > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> >       > in swig_import_helper
> >       > _mod = imp.load_module('_core', fp, pathname, description)
> >       > ImportError: DLL load failed: The specified procedure could
> >       > not be found.
> >       >
> >       >
> >       > Am I missing something?  I also tried the Python27 64-bit
> >       > release but precompiled svn bindings don't appear to be
> >       > available for it and I would prefer not to go through
> >       > everything required to build them myself.
> >       >
> >       > Thank you in advance for your help.
> >       >
> >       > Brian Ellis
> >       >
> >       > -----Original Message-----
> >       > From: Joel Low [mailto:joel@joelsplace.sg]
> >       > Sent: 16 February 2011 00:11
> >       > To: Brian Ellis
> >       > Cc: users@subversion.apache.org
> >       > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> >       >
> >       > [JL] Hi Brian, you can try to check if the SVN DLLs are
> >       > accessible from your 32-bit Python (so 32-bit SVN DLLs,
> >       > Program Files (x86) folder, etc), perhaps by ensuring that
> >       > the Subversion bin directory is in PATH. Remember that hook
> >       > scripts are run without environment variables defined so you
> >       > may have to redefine PATH in your hook script.
> >       >
> > On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark
> > <ma...@siemens.com> wrote:
> >
> >       Hi Brian,
> >
> >       Here are some notes I made for myself about upgrading
> > the bindings when
> >       I upgrade Trac:
> >
> >       ~ deleted the old svn and libsvn directories from
> >       C:\Python26\Lib\site-packages
> >
> >       ~ opened the python bindings .zip and copied the two directories
> >        to site-packages
> >
> >       ~ copied all libsvn\_*.dll files to _*.pyd [1]
> >
> >       ~ restarted the server and crossed fingers...
> >
> >       [1] I found this recommended in the t.e.o wiki at
> > TracSubversion...
> >          http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
> >
> >       ...in particular have you copied/renamed the .dll
> > files?  Hope this
> >       helps...
> >
> >       ~ Mark C
> >
> > -----Original Message-----
> > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> > Sent: 16 February 2011 23:26
> > To: Cooke, Mark
> > Cc: Joel Low; users@subversion.apache.org
> > Subject: Re: Python SVN Bindings on Windows Server 2008 x64
> >
> > In case it helps, I loaded up the 32-bit depends.exe as
> > recommended in the TracSubversion FAQ and tried the load the
> > core module from there ('from svn import core').  I receive the error:
> >
> > LoadLibraryExA("C:\Python27\Lib\site-packages\libsvn\_core.pyd
> > ", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL.
> > Error: The specified procedure could not be found (127).
> >
> > _core.pyd is located at that path so I'm not sure why it
> > can't find it.
> > ____________________________________
> > Brian Ellis
> >
> I'm clutching at straws here but did you rename the files or copy/rename
> them?  I.e. do you just .pyd or both .pyd and .dll?  If the former, try
> copying back to .dll as well (this is what I have).  You will need to
> bounce apache (if you are using it)...  The information I could find
> when I was looking into this was somewhat confused but I seem to
> remember I had very similar problems with only one or the other that
> were fixed when I kept both.
>
> Just checking the Trac site again
> (http://trac.edgewall.org/wiki/TracSubversion#checklist-windows) I
> remember reading this before:
>
>  According to the README.txt file for the Subversion bindings, if you
> are using Python 2.5+ you need to rename all the .dll files in the
> libsvn folder to .pyd files. Upon further research,
> http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll
> indicates you may need to have both the .pyd and .dll version of the
> libsvn files available. This resolved both the 'ImportError: No module
> named _core' error (with only the DLL) and the 'ImportError: DLL load
> failed' (with only the pyd) when testing from the console, and the
> browser.
>
> ...I hope this fixes it!
>
> ~ mark c
>
>
>

RE: Python SVN Bindings on Windows Server 2008 x64

Posted by Joel Low <jo...@joelsplace.sg>.
Hi Brian,

 

The other possible problem I can think of now is that you've got a few
different variants of libapr[|util|iconv] built under different compilers
all accessible from PATH but are binary incompatible with each other. Such a
circumstance can result from using binaries built by different people (the
one that bit me was Apache.org HTTPD built using vc6 and a custom build of
SVN using vc9.) Dependency walker should tell you which functions are
missing; perhaps you could include them, if it is not too many?

 

From: Brian Ellis [mailto:bellis@ticketbiscuit.com] 
Sent: Thursday, 17 February, 2011 9:52 PM
To: Cooke, Mark
Cc: users@subversion.apache.org
Subject: Re: Python SVN Bindings on Windows Server 2008 x64

 

Yeah, I copied the files and renamed them so I have both the .dll and .pyd
files in the directory.  I also rebooted the server, though I'm not sure why
that would matter.  Still no luck :(
____________________________________
Brian Ellis

On Thu, Feb 17, 2011 at 1:11 AM, Cooke, Mark <ma...@siemens.com> wrote:

>       > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
>       > Sent: Wednesday, 16 February, 2011 3:40 AM
>       > To: users@subversion.apache.org
>       > Subject: Python SVN Bindings on Windows Server 2008 x64
>       >
>       > Hi, sorry if this has been covered before but I'm new to
>       > Subversion admin and can't really find a clear answer.  My
>       > goal is to use the python scripts in subversion\tools,
>       > specifically validate-extensions.py in this case.  I am
>       > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
>       > have 32-bit Python 2.7.1 set up on the machine at the moment.
>       >
>       > When I set up the hook, I got an error that the svn module
>       > could not be found.  I installed the latest libsvn bindings I
>       > could find
>       > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
>       in32-1.6.15_py_2.7.zip
> <http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> %0Ain32-1.6.15_py_2.7.zip>  from
>       http://trac.edgewall.org/wiki/TracSubversion) > but I
> still can't load
>       the svn module.  If I run 'from svn
>       > import repos' from the command line, I get:
>       >
>       > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
>       > in swig_import_helper
>       > _mod = imp.load_module('_core', fp, pathname, description)
>       > ImportError: DLL load failed: The specified procedure could
>       > not be found.
>       >
>       >
>       > Am I missing something?  I also tried the Python27 64-bit
>       > release but precompiled svn bindings don't appear to be
>       > available for it and I would prefer not to go through
>       > everything required to build them myself.
>       >
>       > Thank you in advance for your help.
>       >
>       > Brian Ellis
>       >
>       > -----Original Message-----
>       > From: Joel Low [mailto:joel@joelsplace.sg]
>       > Sent: 16 February 2011 00:11
>       > To: Brian Ellis
>       > Cc: users@subversion.apache.org
>       > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
>       >
>       > [JL] Hi Brian, you can try to check if the SVN DLLs are
>       > accessible from your 32-bit Python (so 32-bit SVN DLLs,
>       > Program Files (x86) folder, etc), perhaps by ensuring that
>       > the Subversion bin directory is in PATH. Remember that hook
>       > scripts are run without environment variables defined so you
>       > may have to redefine PATH in your hook script.
>       >
> On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark
> <ma...@siemens.com> wrote:
>
>       Hi Brian,
>
>       Here are some notes I made for myself about upgrading
> the bindings when
>       I upgrade Trac:
>
>       ~ deleted the old svn and libsvn directories from
>       C:\Python26\Lib\site-packages
>
>       ~ opened the python bindings .zip and copied the two directories
>        to site-packages
>
>       ~ copied all libsvn\_*.dll files to _*.pyd [1]
>
>       ~ restarted the server and crossed fingers...
>
>       [1] I found this recommended in the t.e.o wiki at
> TracSubversion...
>          http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
>
>       ...in particular have you copied/renamed the .dll
> files?  Hope this
>       helps...
>
>       ~ Mark C
>
> -----Original Message-----
> From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> Sent: 16 February 2011 23:26
> To: Cooke, Mark
> Cc: Joel Low; users@subversion.apache.org
> Subject: Re: Python SVN Bindings on Windows Server 2008 x64
>
> In case it helps, I loaded up the 32-bit depends.exe as
> recommended in the TracSubversion FAQ and tried the load the
> core module from there ('from svn import core').  I receive the error:
>
> LoadLibraryExA("C:\Python27\Lib\site-packages\libsvn\_core.pyd
> ", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL.
> Error: The specified procedure could not be found (127).
>
> _core.pyd is located at that path so I'm not sure why it
> can't find it.
> ____________________________________
> Brian Ellis
>
I'm clutching at straws here but did you rename the files or copy/rename
them?  I.e. do you just .pyd or both .pyd and .dll?  If the former, try
copying back to .dll as well (this is what I have).  You will need to
bounce apache (if you are using it)...  The information I could find
when I was looking into this was somewhat confused but I seem to
remember I had very similar problems with only one or the other that
were fixed when I kept both.

Just checking the Trac site again
(http://trac.edgewall.org/wiki/TracSubversion#checklist-windows) I
remember reading this before:

 According to the README.txt file for the Subversion bindings, if you
are using Python 2.5+ you need to rename all the .dll files in the
libsvn folder to .pyd files. Upon further research,
http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll
indicates you may need to have both the .pyd and .dll version of the
libsvn files available. This resolved both the 'ImportError: No module
named _core' error (with only the DLL) and the 'ImportError: DLL load
failed' (with only the pyd) when testing from the console, and the
browser.

...I hope this fixes it!

~ mark c

 


Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
Yeah, I copied the files and renamed them so I have both the .dll and .pyd
files in the directory.  I also rebooted the server, though I'm not sure why
that would matter.  Still no luck :(
____________________________________
Brian Ellis

On Thu, Feb 17, 2011 at 1:11 AM, Cooke, Mark <ma...@siemens.com> wrote:

> >       > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> >       > Sent: Wednesday, 16 February, 2011 3:40 AM
> >       > To: users@subversion.apache.org
> >       > Subject: Python SVN Bindings on Windows Server 2008 x64
> >       >
> >       > Hi, sorry if this has been covered before but I'm new to
> >       > Subversion admin and can't really find a clear answer.  My
> >       > goal is to use the python scripts in subversion\tools,
> >       > specifically validate-extensions.py in this case.  I am
> >       > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> >       > have 32-bit Python 2.7.1 set up on the machine at the moment.
> >       >
> >       > When I set up the hook, I got an error that the svn module
> >       > could not be found.  I installed the latest libsvn bindings I
> >       > could find
> >       > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> >       in32-1.6.15_py_2.7.zip
> > <http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> > %0Ain32-1.6.15_py_2.7.zip>  from
> >       http://trac.edgewall.org/wiki/TracSubversion) > but I
> > still can't load
> >       the svn module.  If I run 'from svn
> >       > import repos' from the command line, I get:
> >       >
> >       > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> >       > in swig_import_helper
> >       > _mod = imp.load_module('_core', fp, pathname, description)
> >       > ImportError: DLL load failed: The specified procedure could
> >       > not be found.
> >       >
> >       >
> >       > Am I missing something?  I also tried the Python27 64-bit
> >       > release but precompiled svn bindings don't appear to be
> >       > available for it and I would prefer not to go through
> >       > everything required to build them myself.
> >       >
> >       > Thank you in advance for your help.
> >       >
> >       > Brian Ellis
> >       >
> >       > -----Original Message-----
> >       > From: Joel Low [mailto:joel@joelsplace.sg]
> >       > Sent: 16 February 2011 00:11
> >       > To: Brian Ellis
> >       > Cc: users@subversion.apache.org
> >       > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> >       >
> >       > [JL] Hi Brian, you can try to check if the SVN DLLs are
> >       > accessible from your 32-bit Python (so 32-bit SVN DLLs,
> >       > Program Files (x86) folder, etc), perhaps by ensuring that
> >       > the Subversion bin directory is in PATH. Remember that hook
> >       > scripts are run without environment variables defined so you
> >       > may have to redefine PATH in your hook script.
> >       >
> > On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark
> > <ma...@siemens.com> wrote:
> >
> >       Hi Brian,
> >
> >       Here are some notes I made for myself about upgrading
> > the bindings when
> >       I upgrade Trac:
> >
> >       ~ deleted the old svn and libsvn directories from
> >       C:\Python26\Lib\site-packages
> >
> >       ~ opened the python bindings .zip and copied the two directories
> >        to site-packages
> >
> >       ~ copied all libsvn\_*.dll files to _*.pyd [1]
> >
> >       ~ restarted the server and crossed fingers...
> >
> >       [1] I found this recommended in the t.e.o wiki at
> > TracSubversion...
> >          http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
> >
> >       ...in particular have you copied/renamed the .dll
> > files?  Hope this
> >       helps...
> >
> >       ~ Mark C
> >
> > -----Original Message-----
> > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> > Sent: 16 February 2011 23:26
> > To: Cooke, Mark
> > Cc: Joel Low; users@subversion.apache.org
> > Subject: Re: Python SVN Bindings on Windows Server 2008 x64
> >
> > In case it helps, I loaded up the 32-bit depends.exe as
> > recommended in the TracSubversion FAQ and tried the load the
> > core module from there ('from svn import core').  I receive the error:
> >
> > LoadLibraryExA("C:\Python27\Lib\site-packages\libsvn\_core.pyd
> > ", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL.
> > Error: The specified procedure could not be found (127).
> >
> > _core.pyd is located at that path so I'm not sure why it
> > can't find it.
> > ____________________________________
> > Brian Ellis
> >
> I'm clutching at straws here but did you rename the files or copy/rename
> them?  I.e. do you just .pyd or both .pyd and .dll?  If the former, try
> copying back to .dll as well (this is what I have).  You will need to
> bounce apache (if you are using it)...  The information I could find
> when I was looking into this was somewhat confused but I seem to
> remember I had very similar problems with only one or the other that
> were fixed when I kept both.
>
> Just checking the Trac site again
> (http://trac.edgewall.org/wiki/TracSubversion#checklist-windows) I
> remember reading this before:
>
>  According to the README.txt file for the Subversion bindings, if you
> are using Python 2.5+ you need to rename all the .dll files in the
> libsvn folder to .pyd files. Upon further research,
> http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll
> indicates you may need to have both the .pyd and .dll version of the
> libsvn files available. This resolved both the 'ImportError: No module
> named _core' error (with only the DLL) and the 'ImportError: DLL load
> failed' (with only the pyd) when testing from the console, and the
> browser.
>
> ...I hope this fixes it!
>
> ~ mark c
>

RE: Python SVN Bindings on Windows Server 2008 x64

Posted by "Cooke, Mark" <ma...@siemens.com>.
> 	> From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> 	> Sent: Wednesday, 16 February, 2011 3:40 AM
> 	> To: users@subversion.apache.org
> 	> Subject: Python SVN Bindings on Windows Server 2008 x64
> 	>
> 	> Hi, sorry if this has been covered before but I'm new to
> 	> Subversion admin and can't really find a clear answer.  My
> 	> goal is to use the python scripts in subversion\tools,
> 	> specifically validate-extensions.py in this case.  I am
> 	> running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> 	> have 32-bit Python 2.7.1 set up on the machine at the moment.
> 	>
> 	> When I set up the hook, I got an error that the svn module
> 	> could not be found.  I installed the latest libsvn bindings I
> 	> could find
> 	> (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> 	in32-1.6.15_py_2.7.zip 
> <http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> %0Ain32-1.6.15_py_2.7.zip>  from
> 	http://trac.edgewall.org/wiki/TracSubversion) > but I 
> still can't load
> 	the svn module.  If I run 'from svn
> 	> import repos' from the command line, I get:
> 	>
> 	> File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> 	> in swig_import_helper
> 	> _mod = imp.load_module('_core', fp, pathname, description)
> 	> ImportError: DLL load failed: The specified procedure could
> 	> not be found.
> 	>
> 	>
> 	> Am I missing something?  I also tried the Python27 64-bit
> 	> release but precompiled svn bindings don't appear to be
> 	> available for it and I would prefer not to go through
> 	> everything required to build them myself.
> 	>
> 	> Thank you in advance for your help.
> 	>
> 	> Brian Ellis
> 	>
> 	> -----Original Message-----
> 	> From: Joel Low [mailto:joel@joelsplace.sg]
> 	> Sent: 16 February 2011 00:11
> 	> To: Brian Ellis
> 	> Cc: users@subversion.apache.org
> 	> Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> 	>
> 	> [JL] Hi Brian, you can try to check if the SVN DLLs are
> 	> accessible from your 32-bit Python (so 32-bit SVN DLLs,
> 	> Program Files (x86) folder, etc), perhaps by ensuring that
> 	> the Subversion bin directory is in PATH. Remember that hook
> 	> scripts are run without environment variables defined so you
> 	> may have to redefine PATH in your hook script.
> 	>
> On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark 
> <ma...@siemens.com> wrote:
> 
> 	Hi Brian,
> 	
> 	Here are some notes I made for myself about upgrading 
> the bindings when
> 	I upgrade Trac:
> 	
> 	~ deleted the old svn and libsvn directories from
> 	C:\Python26\Lib\site-packages
> 	
> 	~ opened the python bindings .zip and copied the two directories
> 	 to site-packages
> 	
> 	~ copied all libsvn\_*.dll files to _*.pyd [1]
> 	
> 	~ restarted the server and crossed fingers...
> 	
> 	[1] I found this recommended in the t.e.o wiki at 
> TracSubversion...
> 	   http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
> 	
> 	...in particular have you copied/renamed the .dll 
> files?  Hope this
> 	helps...
> 	
> 	~ Mark C
> 	
> -----Original Message-----
> From: Brian Ellis [mailto:bellis@ticketbiscuit.com] 
> Sent: 16 February 2011 23:26
> To: Cooke, Mark
> Cc: Joel Low; users@subversion.apache.org
> Subject: Re: Python SVN Bindings on Windows Server 2008 x64
> 
> In case it helps, I loaded up the 32-bit depends.exe as 
> recommended in the TracSubversion FAQ and tried the load the 
> core module from there ('from svn import core').  I receive the error:
> 
> LoadLibraryExA("C:\Python27\Lib\site-packages\libsvn\_core.pyd
> ", 0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. 
> Error: The specified procedure could not be found (127).
> 
> _core.pyd is located at that path so I'm not sure why it 
> can't find it.
> ____________________________________
> Brian Ellis
> 
I'm clutching at straws here but did you rename the files or copy/rename
them?  I.e. do you just .pyd or both .pyd and .dll?  If the former, try
copying back to .dll as well (this is what I have).  You will need to
bounce apache (if you are using it)...  The information I could find
when I was looking into this was somewhat confused but I seem to
remember I had very similar problems with only one or the other that
were fixed when I kept both.

Just checking the Trac site again
(http://trac.edgewall.org/wiki/TracSubversion#checklist-windows) I
remember reading this before:

  According to the README.txt file for the Subversion bindings, if you
are using Python 2.5+ you need to rename all the .dll files in the
libsvn folder to .pyd files. Upon further research,
http://www.python.org/doc/faq/windows/#is-a-pyd-file-the-same-as-a-dll
indicates you may need to have both the .pyd and .dll version of the
libsvn files available. This resolved both the 'ImportError: No module
named _core' error (with only the DLL) and the 'ImportError: DLL load
failed' (with only the pyd) when testing from the console, and the
browser. 

...I hope this fixes it!

~ mark c

Re: Python SVN Bindings on Windows Server 2008 x64

Posted by Brian Ellis <be...@ticketbiscuit.com>.
In case it helps, I loaded up the 32-bit depends.exe as recommended in the
TracSubversion FAQ and tried the load the core module from there ('from svn
import core').  I receive the error:
*
LoadLibraryExA("C:\Python27\Lib\site-packages\libsvn\_core.pyd", 0x00000000,
LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: The specified procedure
could not be found (127).*

_core.pyd is located at that path so I'm not sure why it can't find it.
____________________________________
Brian Ellis


On Wed, Feb 16, 2011 at 3:55 AM, Cooke, Mark <ma...@siemens.com> wrote:

> > From: Brian Ellis [mailto:bellis@ticketbiscuit.com]
> > Sent: Wednesday, 16 February, 2011 3:40 AM
> > To: users@subversion.apache.org
> > Subject: Python SVN Bindings on Windows Server 2008 x64
> >
> > Hi, sorry if this has been covered before but I'm new to
> > Subversion admin and can't really find a clear answer.  My
> > goal is to use the python scripts in subversion\tools,
> > specifically validate-extensions.py in this case.  I am
> > running VisualSVN Server 2.15, built on Subversion 1.6.15 and
> > have 32-bit Python 2.7.1 set up on the machine at the moment.
> >
> > When I set up the hook, I got an error that the svn module
> > could not be found.  I installed the latest libsvn bindings I
> > could find
> > (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
> in32-1.6.15_py_2.7.zip from
> http://trac.edgewall.org/wiki/TracSubversion) > but I still can't load
> the svn module.  If I run 'from svn
> > import repos' from the command line, I get:
> >
> > File "C:\Python27\lib\site-packages\libsvn\core.py", line 21,
> > in swig_import_helper
> > _mod = imp.load_module('_core', fp, pathname, description)
> > ImportError: DLL load failed: The specified procedure could
> > not be found.
> >
> >
> > Am I missing something?  I also tried the Python27 64-bit
> > release but precompiled svn bindings don't appear to be
> > available for it and I would prefer not to go through
> > everything required to build them myself.
> >
> > Thank you in advance for your help.
> >
> > Brian Ellis
> >
> > -----Original Message-----
> > From: Joel Low [mailto:joel@joelsplace.sg]
> > Sent: 16 February 2011 00:11
> > To: Brian Ellis
> > Cc: users@subversion.apache.org
> > Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> >
> > [JL] Hi Brian, you can try to check if the SVN DLLs are
> > accessible from your 32-bit Python (so 32-bit SVN DLLs,
> > Program Files (x86) folder, etc), perhaps by ensuring that
> > the Subversion bin directory is in PATH. Remember that hook
> > scripts are run without environment variables defined so you
> > may have to redefine PATH in your hook script.
> >
> Hi Brian,
>
> Here are some notes I made for myself about upgrading the bindings when
> I upgrade Trac:
>
> ~ deleted the old svn and libsvn directories from
> C:\Python26\Lib\site-packages
>
> ~ opened the python bindings .zip and copied the two directories
>  to site-packages
>
> ~ copied all libsvn\_*.dll files to _*.pyd [1]
>
> ~ restarted the server and crossed fingers...
>
> [1] I found this recommended in the t.e.o wiki at TracSubversion...
>    http://trac.edgewall.org/wiki/TracSubversion#forPython2.6
>
> ...in particular have you copied/renamed the .dll files?  Hope this
> helps...
>
> ~ Mark C
>

RE: Python SVN Bindings on Windows Server 2008 x64

Posted by "Cooke, Mark" <ma...@siemens.com>.
> From: Brian Ellis [mailto:bellis@ticketbiscuit.com] 
> Sent: Wednesday, 16 February, 2011 3:40 AM
> To: users@subversion.apache.org
> Subject: Python SVN Bindings on Windows Server 2008 x64
> 
> Hi, sorry if this has been covered before but I'm new to 
> Subversion admin and can't really find a clear answer.  My 
> goal is to use the python scripts in subversion\tools, 
> specifically validate-extensions.py in this case.  I am 
> running VisualSVN Server 2.15, built on Subversion 1.6.15 and 
> have 32-bit Python 2.7.1 set up on the machine at the moment.
> 
> When I set up the hook, I got an error that the svn module 
> could not be found.  I installed the latest libsvn bindings I 
> could find 
> (http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-w
in32-1.6.15_py_2.7.zip from
http://trac.edgewall.org/wiki/TracSubversion) > but I still can't load
the svn module.  If I run 'from svn 
> import repos' from the command line, I get:
> 
> File "C:\Python27\lib\site-packages\libsvn\core.py", line 21, 
> in swig_import_helper 
> _mod = imp.load_module('_core', fp, pathname, description)
> ImportError: DLL load failed: The specified procedure could 
> not be found.
> 
> 
> Am I missing something?  I also tried the Python27 64-bit 
> release but precompiled svn bindings don't appear to be 
> available for it and I would prefer not to go through 
> everything required to build them myself.
> 
> Thank you in advance for your help.
> 
> Brian Ellis
> 
> -----Original Message-----
> From: Joel Low [mailto:joel@joelsplace.sg] 
> Sent: 16 February 2011 00:11
> To: Brian Ellis
> Cc: users@subversion.apache.org
> Subject: RE: Python SVN Bindings on Windows Server 2008 x64
> 
> [JL] Hi Brian, you can try to check if the SVN DLLs are 
> accessible from your 32-bit Python (so 32-bit SVN DLLs, 
> Program Files (x86) folder, etc), perhaps by ensuring that 
> the Subversion bin directory is in PATH. Remember that hook 
> scripts are run without environment variables defined so you 
> may have to redefine PATH in your hook script.
> 
Hi Brian,

Here are some notes I made for myself about upgrading the bindings when
I upgrade Trac:

~ deleted the old svn and libsvn directories from
C:\Python26\Lib\site-packages

~ opened the python bindings .zip and copied the two directories
  to site-packages

~ copied all libsvn\_*.dll files to _*.pyd [1]

~ restarted the server and crossed fingers...

[1] I found this recommended in the t.e.o wiki at TracSubversion...
    http://trac.edgewall.org/wiki/TracSubversion#forPython2.6

...in particular have you copied/renamed the .dll files?  Hope this
helps...

~ Mark C

RE: Python SVN Bindings on Windows Server 2008 x64

Posted by Joel Low <jo...@joelsplace.sg>.
From: Brian Ellis [mailto:bellis@ticketbiscuit.com] 
Sent: Wednesday, 16 February, 2011 3:40 AM
To: users@subversion.apache.org
Subject: Python SVN Bindings on Windows Server 2008 x64

 

Hi, sorry if this has been covered before but I'm new to Subversion admin
and can't really find a clear answer.  My goal is to use the python scripts
in subversion\tools, specifically validate-extensions.py in this case.  I am
running VisualSVN Server 2.15, built on Subversion 1.6.15 and have 32-bit
Python 2.7.1 set up on the machine at the moment.

When I set up the hook, I got an error that the svn module could not be
found.  I installed the latest libsvn bindings I could find
(http://trac.edgewall.org/attachment/wiki/TracSubversion/svn-win32-1.6.15_py
_2.7.zip from http://trac.edgewall.org/wiki/TracSubversion) but I still
can't load the svn module.  If I run 'from svn import repos' from the
command line, I get:

File "C:\Python27\lib\site-packages\libsvn\core.py", line 21, in
swig_import_helper 
_mod = imp.load_module('_core', fp, pathname, description)
ImportError: DLL load failed: The specified procedure could not be found.


Am I missing something?  I also tried the Python27 64-bit release but
precompiled svn bindings don't appear to be available for it and I would
prefer not to go through everything required to build them myself.

Thank you in advance for your help.

Brian Ellis

[JL] Hi Brian, you can try to check if the SVN DLLs are accessible from your
32-bit Python (so 32-bit SVN DLLs, Program Files (x86) folder, etc), perhaps
by ensuring that the Subversion bin directory is in PATH. Remember that hook
scripts are run without environment variables defined so you may have to
redefine PATH in your hook script.