Closed cfpwastaken closed 3 years ago
Does this happen every time you start the example?
Do you have a 'dbi' key in the dictionary when you print edupage.data
?
Does the initial edupage.login()
return true?
Thank you for reporting this issue.
Hello, Yes edupage.login() returns true. I don't know currently what you mean with dbi in edupage.data, i just copy-pasted the code (and changed my username/password), and that's it.
dbi is a attribute where edupage stores some data useful for converting teacher/student/classrom/subject... ids to names. If this key is missing, You get that error. I'm trying to figure out if something is wrong with my code, or your school doesn't have the data for all teachers.
Did you try the other examples? if you do
print(edupage.data.get("dbi") == None)
Do you see True or False?
Hello, this problem was in my code. Is it fixed now?
It's just throwing this exception:
Traceback (most recent call last): File "adw.py", line 9, in <module> timetable = edupage.get_timetable(today) # returns a list of EduLesson File "C:\Users\chaos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\edupage_api\__init__.py", line 76, in get_timetable subject_name = self.ids.id_to_subject(subject_id) File "C:\Users\chaos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\edupage_api\utils.py", line 35, in id_to_subject return self.dbi.get("subjects").get(s_id).get("short") AttributeError: 'NoneType' object has no attribute 'get'