[Zope3-Users] iteration over non sequence in wcdwz3 example

ilflaminio at virgilio.it ilflaminio at virgilio.it
Mon Mar 5 07:27:46 EST 2007


I'm reading Web Component Development with Zope 3. The line
>>> from 
worldcookery.recipe import Recipe
gives me this error: 
Traceback (most 
recent call last):
  File "<interactive input>", line 1, in ?
  File "C:
\Programmi\Python24\lib\site-packages\worldcookery\recipe.py", line 4, 
in ?
    class Recipe:
  File "C:\programmi\Python24\Lib\site-
packages\zope\interface\advice.py", line 132, in advise
    return 
callback(newClass)
  File "C:\programmi\Python24\Lib\site-
packages\zope\interface\declarations.py", line 485, in 
_implements_advice
    classImplements(cls, *interfaces)
  File "C:
\programmi\Python24\Lib\site-packages\zope\interface\declarations.py", 
line 462, in classImplements
    spec.declared += tuple(_normalizeargs
(interfaces))
  File "C:\programmi\Python24\Lib\site-
packages\zope\interface\declarations.py", line 1371, in _normalizeargs
    _normalizeargs(v, output)
  File "C:\programmi\Python24\Lib\site-
packages\zope\interface\declarations.py", line 1370, in _normalizeargs
    for v in sequence:
TypeError: Error when calling the metaclass 
bases
    iteration over non-sequence

Can anyone say to me what this 
message means? I use zope 3.3.1, python 2.4.4, win XP. 
Thanks
Michele

p.s. the recipe code is
from zope.interface import implements
from 
worldcookery.interfaces import IRecipe

class Recipe:
    implements
(IRecipe)

    name = u''
    ingredients = []
    tools = []
    
time_to_cook = 0
    description = u''

from zope.component.factory 
import Factory

recipeFactory = Factory(
    Recipe,
    title=u"Create 
a new recipe",
    description = u"This factory instantiates new 
recipes."
    )



More information about the Zope3-users mailing list