[Zope] Weird error in python module

Gitte Wange gitte@mmmanager.org
Thu, 19 Jul 2001 13:17:10 +0200


Hello out there :-)

I have written a python module used to upload files.
But when I try to start Zope, I get an error. And I can't figure out what=
 is=20
wrong. The error is:
2001-07-19T11:25:36 ERROR(200) Zope Couldn't import Products.MMMCore
Traceback (innermost last):
  File /usr/local/Zope-2.3.2-linux2-x86/lib/python/OFS/Application.py, li=
ne=20
528, in import_products
    (Object: string)
  File=20
/usr/local/Zope-2.3.2-linux2-x86/lib/python/Products/MMMCore/__init__.py,=
=20
line 91, in ?
  File=20
"/usr/local/Zope-2.3.2-linux2-x86/lib/python/Products/MMMCore/MasterFile.=
py",=20
line 280
     def _copy_data(self, instream, outstream):
                                               ^
 SyntaxError: invalid token

And the code looks like this:
=20
        def _copy_data(self, instream, outstream):
           """Copy data"""
           if type(instream) is StringType:
               outstream.write(instream)
           else:
              try:
                instream.seek(0,2)
                size=3Dinstream.tell()
                instream.seek(0)
                blocksize=3D2<<16
                pos=3D0
                while pos<size:
                    outstream.write(instream.read(blcksize))
                    pos=3Dpos+blocksize
                instream.seek(0)
              except:
                outstream.write(instream.read())

Does anybody know what might be wrong ??

Regards,
--=20
Gitte Wange Jensen

Sys Admin, Developer and a lot more
MMmanager.org Aps, Denmark

Phone: +45 29 72 79 72
Email: gitte@mmmanager.org
Web: www.mmmanager.org

Quote of the day:
Den bedste chef er den, som har d=F8mmekraft nok til at v=E6lge gode
mennesker til at g=F8re det, han selv ville have gjort, og selvbeherskels=
e
nok til at afholde sig fra at blande sig i deres arbejde, mens de g=F8r d=
et.

	- Theodore Roosevelt