[Zope-Perl] Python::getattr failure

Robin Smidsrod robin@etools.no
Tue, 19 Feb 2002 16:31:48 +0100 (CET)


I get this error in a Perl External Method. Anybody know the cause of this?

Can't load '/usr/lib/perl5/site_perl/5.6.1/i386-linux-thread-multi/auto/Python/Object/Object.so' for module Python::Object: /usr/lib/perl5/site_perl/5.6.1/i386-linux-thread-multi/auto/Python/Object/Object.so: undefined symbol: PyExc_ArithmeticError at /usr/lib/perl5/5.6.1/i386-linux-thread-multi/DynaLoader.pm line 206.
 at /usr/lib/perl5/site_perl/5.6.1/i386-linux-thread-multi/Python.pm line 3
Compilation failed in require at /usr/lib/perl5/site_perl/5.6.1/i386-linux-thread-multi/Python.pm line 3.
Compilation failed in require at GetPreferredLanguage.pm line 3.
BEGIN failed--compilation aborted at GetPreferredLanguage.pm line 3.


This is the top of the script which fails:

package ZopeExt::Etools::GetPreferredLanguage;

use Python qw(getattr);

sub GetPreferredLanguage {

        my $self=shift;
        my $sqlfolder=Python::getattr($self, "SQL");
        my $sql=Python::getattr($sqlfolder,"Language");



If I delete the 'use Python...'-line and use 'my
$sql=$self->{SQL}->{Language}' instead of the two Python::getattr-calls it
works. But the darn thing won't work with aquisition if I do it this
way, which is correct, because this uses item access (AFAIK), and that
doesn't do aquisition. If I try to use 'my
$sql=$self->SQL->Language' I get the __call__ error. SQL and
Language are two folders which holds Z SQL Methods.

I know this has been asked before, but I cannot see any answer to any
of the questions being posted, therefore I ask again.

I know both Andy McKay and Gisle Aas have been somewhat involved in this
before, so I hope they worked out an answer.

TIA

-- Robin