-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: 'type' object is not iterable #288
Comments
@gelbi123 This is not really a problem with zope.interface. You appear to be storing references to the interface in the ZODB. When the code for a class is no longer available, the ZODB loads it as an instance of In general with the ZODB you should remove all persistent references to a class before you remove the class from the code. If it's already too late, you can use https://pypi.org/project/zodbupdate/ to convert those references to a different class. zope.interface could perhaps be improved to show a clearer error message in this case, where it gets an object that is not an interface where it is expecting an interface. |
@davisagli thanks for your reply and sorry for my late reply! You are right, it is not a problem with zope.interface itself. Or in that case a object (folder) which should direclty provide ZODB.broken.Broken But I wanted to mention that this behaviour could be a timebomb in the case of Running a complex system with multiple zope instances coupled via ZEO. Then a This was approximately the case in my(our) setup. In that case I would expect that the code depending on the marker interface Can you recommend a better place to mention that? |
Actually a solution might be to "fake" the existence of the old |
@jensens Thank you for sharing this technique. In my case it wasn't actually the problem to The problem was more that the added marker interface To prevent this I developed a customized InterfaceClass object |
@gelbi123 As your problem seems to be solved, I am closing this issue now. |
Dear Zope-Developer Team,
following issue appeared:
What I did:
I created a MarkerInterface
and marked a ZMI-Folder @root with this Interface (via Interfaces-tab).
Now I removed the source file where the markerinterface is declared and
restarted the instance. The restart works fine but EVERY request will lead
now to the error described above.
Issue research:
File: declarations.py
Here some informations about the sequence parameter from debug session
What version of Python and Zope/Addons I am using:
The text was updated successfully, but these errors were encountered: