Well here's the output when I try python MasterFile.py: File "MasterFile.py", line 282 def _copy_data(self, instream, outstream): ^ IndentationError: unindent does not match any outer indentation level Hmmm .. so it's an indetation problem ??? 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 what 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/MasterFile.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=instream.tell() instream.seek(0) blocksize=2<<16 pos=0 while pos<size: outstream.write(instream.read(blcksize)) pos=pos+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ømmekraft nok til at vælge gode mennesker til at gøre det, han selv ville have gjort, og selvbeherskelse nok til at afholde sig fra at blande sig i deres arbejde, mens de gø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 )