[Zope] External Method & LocalFS
Jonothan Farr
jfarr@real.com
Mon, 12 Feb 2001 15:07:22 -0800
'basepath' is a directory. You want "Imagenes['logo.gif']._local_path"
--jfarr
----- Original Message -----
From: <Belen.Ares-Paredes@symbian.com>
To: <zope@zope.org>
Sent: Monday, February 12, 2001 6:48 AM
Subject: [Zope] External Method & LocalFS
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"Imagenes['logo.gif'].basepath")
File C:\TestRes\lib\python\DocumentTemplate\DT_Util.py, line 337, in
eval
(Object: minipil(imagen))
(Info: imagen)
File <string>, 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
*
*************************************************************************=
*******
**********************************
Symbian Limited (Co.No.3173352) Registered Office: Sentinel House, 16 Har=
court
Street, London, W1H 4AD, UK.
This message is intended only for use by the named addressee and may cont=
ain
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@symbian.com =
and
delete the message and any attachments accompanying it immediately. Symbi=
an does
not accept liability for any corruption, interception, amendment, tamperi=
ng or
viruses occuring to this message in transit or for any message sent by it=
s
employees which is not in compliance with Symbian corporate policy.
*************************************************************************=
*******
***********************************
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )