Closed difhel closed 2 months ago
I tried running your script but it complains about the shared.db
import.
I have prepared an MRE for this problem. Don't forget to insert your token in bot/main.py:12.
Link: https://github.com/difhel/aps-mre-2.
Note bot/routers/admin/router.py:17-19. This is an empty function that never triggers and does nothing. However, if you comment out this function, the error changes to another (see #872). This is very strange, I have no idea why this happens or how to fix it. Obviously it's a bug in either aiogram, aps, or pickle, but in any of the three cases I have absolutely no idea how to solve this further. It was already very hard to find, out of 5000 lines of code, exactly which empty function breaks the code when deleted.
By the way, thank you for your great work on this lib.
So...how do I install and run this?
I'm closing this due to the lack of responses. You need to provide me a MINIMUM workable example – that is, not something that requires a Discord token or something else. If this cannot be reproduced without the Discord Python library, then maybe that's the issue? Either way, it's your responsibility to figure out if APScheduler is really the problem, not mine. I'll reopen the issue if you work that out.
Things to check first
[X] I have checked that my issue does not already have a solution in the FAQ
[X] I have searched the existing issues and didn't find my bug already reported there
[X] I have checked that my bug is still present in the latest release
Version
3.10.4
What happened?
I use asyncio scheduler because my project uses an asyncio based framework (aiogram). When I receive a message, I create a task that will execute after a certain number of seconds:
Here's my code with the scheduler (I'm using Singleton wrapper to make sure only one scheduler object is used):
If you uncomment and use memory jobstore instead of MongoDB, the code works perfectly. This error occurs with MongoDB:
How can we reproduce the bug?
See the code above