Skip to content

Conversation

@Nathaniel-Girard
Copy link
Contributor

@Nathaniel-Girard Nathaniel-Girard commented Aug 18, 2025

The bug was caused by awaiting a synchronous function with asyncio.run.
Closes #171

@@ -46,7 +46,7 @@ def read_arguments() -> argparse.Namespace:
if args.command == TOOL_NAME_MIGRATE_STUDENT:
asyncio.run(migrate_discord_students.main(arguments=sys.argv[2:]))
elif args.command == TOOL_NAME_UPDATE_STUDENTS_LIST:
Copy link
Owner

@BaboucheOne BaboucheOne Aug 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found the cause of the problem. The main of update_students_list is not async (and the whole code of this file too btw).
I think the real patch is to convert https://github.com/BaboucheOne/BuggyBot/blob/main/tools/update_students_list.py as a real async script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, if you do it I don't mind, I just chose the easiest way to fix the bug

@BaboucheOne BaboucheOne added refactor Refactor fix Fix broken things labels Aug 23, 2025
@BaboucheOne BaboucheOne merged commit 621af2d into BaboucheOne:main Aug 24, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix broken things refactor Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AsyncIO bug when updating student list

2 participants