i'm a newbee at python and i'm having this error when importing class from a file this is my directory
-*
-- access.py
-- alloweds.py
in my acces.py i have this (is not all the complete code)
from alloweds import clasifier, record_user
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='python')
cursor=conn.cursor()
uuid_id = uuid.uuid1()
alloweds=clasifier()
record = record_user()
and in my alloweds.py
from access import cursor
class clasifier():
def __init__(self):
self.Invited=['Test']
def verify(self,name):
if name in self.Invited:
return('Accept')
else:
return('Deny')
class record_user():
##code
and this is the error log
Traceback (most recent call last):
File ".\access.py", line 9, in <module>
from listaPermitidos import clasifier, record_user
File "C:\Users\rbnvl\alloweds.py", line 3, in <module>
from access import cursor
File "C:\Users\rbnvl\access.py", line 9, in <module>
from alloweds import clasifier, record_user
ImportError: cannot import name 'clasifier' from 'alloweds' (C:\Users\rbnvl\alloweds.py)