[Zope-Perl] Aquisition?

Andy McKay andym@ActiveState.com
Wed, 27 Jun 2001 13:57:50 -0700


So sql isnt inside the reports folder? That wont work and wouldn't in
python.
You first have to get the root and then get the sql folder.

Cheers.
--
  Andy McKay.


----- Original Message -----
From: "Ulrich Wisser" <u.wisser@publisher.de>
To: <zope-perl@zope.org>
Sent: Wednesday, June 27, 2001 12:15 AM
Subject: [Zope-Perl] Aquisition?


> Hello,
>
> I have a Script(Perl, unrestricted) in my Folder "/reports/".
> The script needs to use a ZSQL Method in folder "/sql/Lst/".
> Here is my code:
>
> my $sql = Python::getitem($self, "sql");
> my $Lst = Python::getitem($sql, 'Lst');
> foreach $row ($Lst->Submitstat("site" => $self->{REQUEST}->website, "dat"
> => $self->{REQUEST}->datum)) {
>          $worksheet->write($row, 1, $row);
>          $row++;
> }
>
> But that doesn't work. Here is the error message:
>
> Error Type: KeyError
> Error Value: sql
>
> Traceback:
>
> File /usr/local/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 223, in
> publish_module
> File /usr/local/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
> File /usr/local/Zope-2.3.2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>   (Object: Traversable)
> File /usr/local/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 171, in
> publish
> File /usr/local/Zope-2.3.2/lib/python/ZPublisher/mapply.py, line 160, in
mapply
>   (Object: excel_dok)
> File /usr/local/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
>   (Object: excel_dok)
> File
> /usr/local/Zope-2.3.2/lib/python/Products/PerlExternalMethod/__init__.py,
> line 119, in __call__
>   (Object: excel_dok)
> File /usr/local/Zope-2.3.2/lib/python/OFS/ObjectManager.py, line 678, in
> __getitem__
>   (Object: Traversable)
> KeyError: (see above)
>
>
> What is the error? How can I use my ZSQL Methods?
>
> Thanks
>
> Ulrich
> --
> Searchengine Know How  - Webpromotion - Optimization - Internal Search
> World Wide Web Publisher, Ulrich Wisser, Odensvag 13, S-14571 Norsborg
> http://www.publisher.de   Tel: +46-8-53460905    Fax: +46-8-534 609 06
>
>
> _______________________________________________
> Zope-perl maillist  -  Zope-perl@zope.org
> http://lists.zope.org/mailman/listinfo/zope-perl
>