Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teacher free days traceback #6

Closed
Narwhall85 opened this issue Nov 28, 2023 · 5 comments
Closed

Teacher free days traceback #6

Narwhall85 opened this issue Nov 28, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Narwhall85
Copy link

Narwhall85 commented Nov 28, 2023

Przy próbie odpalenia nieobecności nauczycieli, wyrzuca błąd:

Traceback (most recent call last):
File "C:\Users\czerw\Downloads\librusik-stable\librusik-stable\librusik.py", line 881, in teacherfreedays
result = (await librus.get_teacher_free_days())[::-1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\czerw\Downloads\librusik-stable\librusik-stable\lib\api\librus.py", line 208, in get_teacher_free_days
i["Teacher"] = teachers[i["Teacher"]["Id"]]
^^^^^^^^^^^^^^^^^^^^
KeyError: 2020133

Zrzut ekranu 2023-11-28 101851

@dani3l0
Copy link
Owner

dani3l0 commented Dec 2, 2023

Owow, sorry nie zauważyłem issua :(

Wygląda mi jakby librusik dostał id nieistniejącego nauczyciela? Nie mam dostępu do librusa już, ale możemy spróbować klasycznie wsadzić ten kawałek kodu w try/catch i zobaczyć czy pomoże

@dani3l0 dani3l0 added the bug Something isn't working label Dec 2, 2023
@dani3l0 dani3l0 closed this as completed in 5e570ad Dec 2, 2023
@dani3l0 dani3l0 reopened this Dec 2, 2023
@dani3l0
Copy link
Owner

dani3l0 commented Dec 2, 2023

git chyba wyłapuje słowo 'fix' w commicie

Daj znać czy partyzancki fix pomógł xD

@Narwhall85
Copy link
Author

Jakimś cudem to naprawiłem, że jak jest to ID nauczyciela to ignoruje i no

teraz sie staram jak zrobić, żeby ogłoszenia zrobić
topornie idzie ale próbuje

@Narwhall85
Copy link
Author

Zaraz spróbuje tego fixa czy działa

@dani3l0
Copy link
Owner

dani3l0 commented Dec 3, 2023

teraz sie staram jak zrobić, żeby ogłoszenia zrobić
topornie idzie ale próbuje

W toolsach masz dump_full_api.py, może okazać się przydatne xd

@dani3l0 dani3l0 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants