[Zope] Weird error in python module

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


Sorry ... I just debugged the entire module in python and there was some=20
indentation problems.

Seem like I must get used to doing it nicely ... hehe .. not like i C :-)

Greetings - and thanx for helping me
Gitte

On Thursday 19 July 2001 13:22, you wrote:
> You may have white-space after the colon.
>
> Does the colon have to be the last character in the line?
>
> I suggest you try
>   python MasterFile.py
> and see if you get the same error.
>
> At 13:17 19/07/01 +0200, you wrote:
> >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 w=
hat
> > is 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,
> > line 528, in import_products
> >    (Object: string)
> >  File
> >/usr/local/Zope-2.3.2-linux2-x86/lib/python/Products/MMMCore/__init__.=
py,
> >line 91, in ?
> >  File
> >"/usr/local/Zope-2.3.2-linux2-x86/lib/python/Products/MMMCore/MasterFi=
le.p
> >y
>
> ",
>
> >line 280
> >     def _copy_data(self, instream, outstream):
> >                                               ^
> > SyntaxError: invalid token
> >
> >And the code looks like this:
> >
> >        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,
> >--
> >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 selvbehersk=
else
> >nok til at afholde sig fra at blande sig i deres arbejde, mens de g=F8=
r det.
> >
> >	- Theodore Roosevelt
> >
> >_______________________________________________
> >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 )