[Zope] External Method limits
Dieter Maurer
dieter@handshake.de
Wed, 11 Jul 2001 21:14:27 +0200 (CEST)
Lee Harr writes:
> I am working through the section of the Zope Book on External Methods
> (chapter 8: Advanced Zope Scripting --
> http://www.zope.org/Members/michel/ZB/ScriptingZope.dtml -- Secton: Using
> External Methods)
>
> There is an example there which uses PIL that I am having some trouble with.
> Whenever I try to use makeThumbnail on a file which is more than about 60K I
> get the following error:
>
>
> Error Type: TypeError
> Error Value: expected string, ImplicitAcquirerWrapper found
> ...
> File /usr/local/www/Zope/Extensions/Thumbnail.py, line 18, in makeThumbnail
> (Object: Traversable)
> TypeError: (see above)
Seems you use "file.data".
This is a string for small file sizes but an object for large ones.
Use "str(file.data)", instead.
Dieter