[Zope-Perl] still struggling with Zope-Perl on Solaris Sparc

Gisle Aas gisle@ActiveState.com
19 Aug 2000 21:10:33 +0200


Harry Danilevsky <hdanilevsky@siichi.com> writes:

> OK, I built python+perl, and the tests all run fine.
> I copied PerlMethod, PerlExternalMethod and ZDBI_DA
> to $ZOPEROOT/lib/python/Products. Both PerlMethod and
> PerlExternalMethod appear as "Broken" if I click on them,
> here are the tracebacks:
> 
> PerlMethod Import Traceback
> 
> Traceback (innermost last):
>   File "/opt/Zope-2.1.6-solaris-2.6-sparc/lib/python/OFS/Application.py",
> line 387, in import_products
>     product=__import__(pname, global_dict, global_dict, silly)
>   File
> "/opt/Zope-2.1.6-solaris-2.6-sparc/lib/python/Products/PerlMethod/__init__.p
> y", line 69, in ?
>     class PerlMethod(OFS.SimpleItem.Item, Persistent, Acquisition.Explicit,
>   File
> "/opt/Zope-2.1.6-solaris-2.6-sparc/lib/python/Products/PerlMethod/__init__.p
> y", line 80, in PerlMethod
>     manage_options=(
> AttributeError: manage_options

That blows up at this statement:

    manage_options=(
        (
        {'label':'Properties', 'action':'manage_main',},
        {'label':'Try It', 'action':'manage_try'},
        )
        +OFS.SimpleItem.Item.manage_options
        +AccessControl.Role.RoleManager.manage_options
        )

which I guess means that OFS.SimpleItem.Item or
AccessControl.Role.RoleManager don't have the 'manage_options' for
you.  I have no clue why that should happen?

Perhaps we actually require Zope-2.2 and I should document that in the
README.

> With ZDBI_DA I had not much more luck either. I use Sybase,
> and I set up a connection object using the string:
> "sampleuser:samplepassword@dbi:Sybase:server=DVMT"
> 
> and I get "Invalid connection string" error.
>
> Zope seems to parse this string correctly
> (it prints "DBI Connect ['dbi:Sybase:server=DVMT', 'sampleuser',
> 'samplepassword'] ")
> but doesn't give me a connection. dbi-test.py which comes with zope-perl
> works fine. I don't think it's Sybase-related environment variables either,
> because SybaseDA package works.
> 
> How do I debug this whole thing (sort of emulating Zope environment, but
> outside of Zope) ?
> I've been using Perl for a while, but Python is very new to me.

If you get PerlMethod up running you could try to use DBI from it.
You could also try to make dbi-test.py into a python external method
and see if that works.

Regards,
Gisle