[Zope3-Users] Wierd import problem
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Mar 1 08:15:02 EST 2006
On Tuesday 28 February 2006 06:50, Florian Lindner wrote:
> ImportError: cannot import name UserRegistrationField
>
>
>
> my views.py has:
>
>
> class UserRegistrationField(TextLine):
> implements(ITextLine)
>
> def _validate(self, value):
> super(UserRegistrationField, self)._validate(value)
> [...]
>
>
> and my interfaces.py:
>
> from views import UserRegistrationField
>
> both are in the same directory. If I remove the the import everything goes
> well. If I cut&paste the code from views.py to interfaces it works too.
>
> What am I doing wrong here?
This is a classical circular import error. If your views.py, for example,
imports interfaces.py, you have a circular import loop between views.py and
interfaces.py.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-users
mailing list