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):
...

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 )

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.