Fix the event loop error with importlib method#14
Fix the event loop error with importlib method#14NeonBubbles wants to merge 2 commits intosockysec:mainfrom
Conversation
|
Hey Neon - A huge thanks for working through these changes to implement the importlib method! I'll conduct some tests after the holiday season, and merge/provide feedback as needed. |
|
Sorry for the long delay - just got around to beginning some testing. Looking good so far, however, I did experience the following error. Might still be some event loop/asynco issue persisting Traceback (most recent call last): |
You seem to be testing with the code from the current main branch instead of this pull request. I have abandoned the exec function. |
|
Haha that'll do it. Tested the right one this time and it seems to be working well, resolving the loop issue as intended. However... Scripts appear to load line by line like a typewriter, making them significantly slower. For example, instead of the whole launcher's text loading instantly, it prints it line by line. The same goes for results returned by queries (i.e. user details). This will need to be resolved before further testing/merging with main. |
|
I've never come across this issue before. When I rerun the program, it loads and displays the lines almost instantly on both of my computers. Is it possible that other applications are heavily using your system resources? |
I used importlib in launcher.py to dynamically import the scripts that need to be run. For those scripts that utilize asynchronous operations, I manage the event loop directly in launcher.py, which helps avoid potential event loop errors. Therefore, to utilize importlib, I've made changes to almost all scripts' structure, but the core code remains largely unchanged. I conducted some manual tests for each script, but I recommend you do some testing again before merging. Feel free to give feedback if there are any issues.