TypeError: Error when calling the metaclass bases

This article helped me by fixing this exception. The following code gave this exception

...
from a import A
class B (A):
...

but this was wrong because my class had the same name as the file it was in. This meant that my class had the same name as the module. To make it right it should be:

...
from a import A
class B (A.A):
...
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s