[Zope] External Method & LocalFS

Belen.Ares-Paredes@symbian.com Belen.Ares-Paredes@symbian.com
Mon, 12 Feb 2001 14:48:55 +0000


Hello there,

I have an External Method which takes as a parameter the basepath of an
LocalFS Object:

<dtml-let imagen=3D"Imagenes['logo.gif'].basepath"  >
<dtml-call "minipil(imagen)">
</dtml-let>

The external Method is a s follows:

#minipil.py
import Image

def conversion(a):

     im =3D Image.open(a)
     return im.format

Everything is very simple but I get the following error:
                                                                           =
 
 Error Type: IOError                                                       =
 
 Error Value: [Errno 13] Permission denied: 'c:\\TestRes\\images'          =
 
 where this is the base path for the Local File System                     =
 
                                                                           =
 
 <!--                                                                      =
 
 Traceback (innermost last):                                               =
 
   File C:\TestRes\lib\python\ZPublisher\Publish.py, line 222, in          =
 
 publish_module                                                            =
 
   File C:\TestRes\lib\python\ZPublisher\Publish.py, line 187, in publish  =
 
   File C:\TestRes\lib\python\Zope\__init__.py, line 221, in               =
 
 zpublisher_exception_hook                                                 =
 
     (Object: Traversable)                                                 =
 
   File C:\TestRes\lib\python\ZPublisher\Publish.py, line 171, in publish  =
 
   File C:\TestRes\lib\python\ZPublisher\mapply.py, line 160, in mapply    =
 
     (Object: Prueba)                                                      =
 
   File C:\TestRes\lib\python\ZPublisher\Publish.py, line 112, in          =
 
 call_object                                                               =
 
     (Object: Prueba)                                                      =
 
   File C:\TestRes\lib\python\OFS\DTMLMethod.py, line 172, in __call__     =
 
     (Object: Prueba)                                                      =
 
   File C:\TestRes\lib\python\DocumentTemplate\DT_String.py, line 528, in  =
 
 __call__                                                                  =
 
     (Object: Prueba)                                                      =
 
   File C:\TestRes\lib\python\DocumentTemplate\DT_Let.py, line 147, in     =
 
 render                                                                    =
 
     (Object: imagen=3D&quot;Imagenes['logo.gif'].basepath&quot;)          =
  =20
   File C:\TestRes\lib\python\DocumentTemplate\DT_Util.py, line 337, in    =
 
 eval                                                                      =
 
     (Object: minipil(imagen))                                             =
 
     (Info: imagen)                                                        =
 
   File &lt;string&gt;, line 0, in ?                                       =
 
   File C:\TestRes\lib\python\Products\ExternalMethod\ExternalMethod.py,   =
 
 line 263, in __call__                                                     =
 
     (Object: minipil)                                                     =
 
     (Info: (('c:\\TestRes\\images',), {}, None))                          =
 
   File C:\TestRes\Extensions\minipil.py, line 8, in conversion            =
 
   File \\lon-integtest01\C\TestRes\bin\PIL\Image.py, line 874, in open    =
 
 IOError: (see above)                                                      =
 
                                                                           =
 
 Can you see anything obvious that I am missing?                           =
 
 Thanks for your help.                                                     =
 
                                                                           =
 
 Bel=E9n                                                                   =
  =20
                                                                           =








*
 **************************************************************************=
****************************************
Symbian Limited (Co.No.3173352) Registered Office: Sentinel House, 16 Harco=
urt Street, London, W1H 4AD, UK.
This message is intended only for use by the named addressee and may contai=
n privileged and/or confidential information. If you are not the named addr=
essee you should not disseminate, copy or take any action in reliance on it=
. If you have received this message in error please notify postmaster@symbi=
an.com and delete the message and any attachments accompanying it immediate=
ly. Symbian does not accept liability for any corruption, interception, ame=
ndment, tampering or viruses occuring to this message in transit or for any=
 message sent by its employees which is not in compliance with Symbian corp=
orate policy.
***************************************************************************=
****************************************