[Zope] Invalide syntax on (of all things) def initialize(context):

complaw@hal-pc.org complaw@hal-pc.org
Thu, 23 Aug 2001 17:55:21 GMT


> First check your indentation. The 'icon' line seems to break
> the code.

I checked.  The indentation was okay.  I don't know why it didn't seem to paste
correctly, buth there was two tabs in front of 'icon'.

Thanks!

Ron

> 
> Andreas
> ----- Original Message -----
> From: <complaw@hal-pc.org>
> To: <zope@zope.org>
> Sent: Donnerstag, 23. August 2001 11:35
> Subject: [Zope] Invalide syntax on (of all things) def initialize(context):
> 
> 
> > As impossible as it seems, my Zope 2-3-1 had the temerity to say this
> > __init__.py....
> >
> > import Doctrine
> >
> > def initialize(context):
> >         """Initialize the Legal Doctrine Product."""
> >
> >         context.registerClass(
> >                 Doctrine.Doctrine,
> >                 constructors = (
> >                         Doctrine.manage_addDoctrineForm,
> >                         Doctrine.manage_addDoctrine
> >                 ),
> > icon = 'images/Doctrine.jpg'
> >         )
> >
> >
> > .. gave me this...
> >
> > Import Traceback
> >
> > Traceback (innermost last):
> >   File "/usr/local/zope/2-3-1/lib/python/OFS/Application.py", line 536, in
> > import_products
> >     product=__import__(pname, global_dict, global_dict, silly)
> >   File
> "/usr/local/zope/2-3-1/lib/python/Products/LegalDoctrine/__init__.py",
> > line 3
> >      def initialize(context):
> >      ^
> >  SyntaxError: invalid syntax
> >
> >
> > I've seen def initialize(context): done for several different Zope
> products.
> > Does my instance of Zope just not like me?  Someone please tell me that
> I'm not
> > crazy.
> >
> > Ron
> >
> >
> > _______________________________________________
> > 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 )
> 
> 
> _______________________________________________
> 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 )
>