You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Arnout Standaert <ar...@student.kuleuven.ac.be> on 2004/12/10 10:57:32 UTC
Mailer.py on Windows
Hi list,
I'm trying to get the mailer.py script working at post-commit on a test
repository running under Windows 2000.
Test-running my post-commit.bat file, I get the following error:
Traceback (most recent call last):
File "e:/svn/testing\hooks\mailer.py", line 861, in ?
author, propname, action)
File "c:\Python23\lib\svn\core.py", line 33, in run_app
return apply(func, (pool,) + args, kw)
File "e:/svn/testing\hooks\mailer.py", line 37, in main
repos = Repository(repos_dir, rev, pool)
File "e:/svn/testing\hooks\mailer.py", line 593, in __init__
self.repos_ptr = svn.repos.open(repos_dir, pool)
AttributeError: 'module' object has no attribute 'open'
I'm running Subversion 1.1.1 combined with the Python 2.3 bindings for
1.1.1 that I got from the Documents & Files section. Python installed is
ActiveState Python 2.4.3.
Any ideas on this? A google/mailing list search did not turn up too
much...
Thanks in advance,
Wald
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Mailer.py on Windows
Posted by François Beausoleil <fb...@ftml.net>.
Hmm, I have the same kind of problem...
On 10/12/2004 10:38, Arnout Standaert wrote:
> Traceback (most recent call last):
> File "e:\SVN\testing\hooks\mailer.py", line 754, in ?
> author, propname)
> File "c:\Python23\lib\svn\core.py", line 33, in run_app
> return apply(func, (pool,) + args, kw)
> File "e:\SVN\testing\hooks\mailer.py", line 36, in main
> repos = Repository(repos_dir, rev, pool)
> File "e:\SVN\testing\hooks\mailer.py", line 558, in __init__
> self.root_this = self.get_root(rev)
> File "e:\SVN\testing\hooks\mailer.py", line 570, in get_root
> root = self.roots[rev] = svn.fs.revision_root(self.fs_ptr, rev,
> self.pool)
> SystemError: null argument to internal routine
I get the same error when something goes wrong. It looks like the
Subversion Python bindings cannot print the actual error message that
occurs.
See this thread for more information:
http://svn.haxx.se/dev/archive-2004-12/0370.shtml
The gist of it is that the bindings always return "null argument to
internal routine" instead of returning the actual error message, as Mike
showed me on his Linux box.
I think someone who builds the bindings can give us more help, here.
Anyone with the Windows bindings can try the following:
def repro(pool):
repos.svn_repos_open('no-repos-named-that-way', pool)
def main():
print core.SVN_VER_MAJOR, core.SVN_VER_MINOR, core.SVN_VER_MICRO
core.run_app(repro)
if __name__ == '__main__':
main()
This is copied verbatim from my original message in thread mentionned above.
Thanks for any tips.
Bye !
François
Re: Mailer.py on Windows
Posted by Arnout Standaert <ar...@student.kuleuven.ac.be>.
François Beausoleil wrote:
> On 10/12/2004 05:57, Arnout Standaert wrote:
>
>> File "e:/svn/testing\hooks\mailer.py", line 593, in __init__
>> self.repos_ptr = svn.repos.open(repos_dir, pool)
>> AttributeError: 'module' object has no attribute 'open'
>
> The function is named "svn_repos_open" in 1.1.1. It looks like you're
> using the trunk version of mailer.py. Use the one from the 1.1.1 tag:
>
> http://svn.collab.net/repos/svn/tags/1.1.1
Thanks, Francois! That was the problem indeed, I downloaded the correct
version and the svn.repos.open command is found correctly now.
But I'm slipping into more serious trouble, so it seems :-)
Currently I'm not able to solve this one:
Traceback (most recent call last):
File "e:\SVN\testing\hooks\mailer.py", line 754, in ?
author, propname)
File "c:\Python23\lib\svn\core.py", line 33, in run_app
return apply(func, (pool,) + args, kw)
File "e:\SVN\testing\hooks\mailer.py", line 36, in main
repos = Repository(repos_dir, rev, pool)
File "e:\SVN\testing\hooks\mailer.py", line 558, in __init__
self.root_this = self.get_root(rev)
File "e:\SVN\testing\hooks\mailer.py", line 570, in get_root
root = self.roots[rev] = svn.fs.revision_root(self.fs_ptr, rev,
self.pool)
SystemError: null argument to internal routine
There seems to be something wrong with the arguments for the
revision_root command (in fs.dll, I presume). Printing the arguments to
the commandline didn't show any arguments being null, "rev" holds the
correct revision number, self.fs_ptr and self.pool hold *some* value
other than null, but I can't really get my head around those.
So, once again, any ideas are appreciated...
Kind regards,
Arnout Standaert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Mailer.py on Windows
Posted by François Beausoleil <fb...@ftml.net>.
On 10/12/2004 05:57, Arnout Standaert wrote:
> Hi list,
>
> I'm trying to get the mailer.py script working at post-commit on a test
> repository running under Windows 2000.
> Test-running my post-commit.bat file, I get the following error:
>
> Traceback (most recent call last):
> File "e:/svn/testing\hooks\mailer.py", line 861, in ?
> author, propname, action)
> File "c:\Python23\lib\svn\core.py", line 33, in run_app
> return apply(func, (pool,) + args, kw)
> File "e:/svn/testing\hooks\mailer.py", line 37, in main
> repos = Repository(repos_dir, rev, pool)
> File "e:/svn/testing\hooks\mailer.py", line 593, in __init__
> self.repos_ptr = svn.repos.open(repos_dir, pool)
> AttributeError: 'module' object has no attribute 'open'
>
> I'm running Subversion 1.1.1 combined with the Python 2.3 bindings for
> 1.1.1 that I got from the Documents & Files section. Python installed is
> ActiveState Python 2.4.3.
>
> Any ideas on this? A google/mailing list search did not turn up too
> much...
The function is named "svn_repos_open" in 1.1.1. It looks like you're
using the trunk version of mailer.py. Use the one from the 1.1.1 tag:
http://svn.collab.net/repos/svn/tags/1.1.1
Hope that helps !
François