Closed psmgeelen closed 4 months ago
Thanks for the detailed report! I agree with you that switching from imp
to importlib
is probably the straightforward approach. It looks like importlib.reload
was introduced in Python 3.4, so version support isn't something we need to worry about. I would also move the import to the top and just get rid of the conditional there.
The longer-term solution (which I've been working on, but still needs more work), is to get away from work being done at import (this is mostly done), and to introduce another mechanism to use updated settings (this still needs a fair bit of work)
Hey @xsdg , should I create a PR for changing the imp
to importlib
for the time being? Or do you want to prioritize on the refactor that you mentioned? (If I can help with the refactor, please let me know :) )
Yeah, it probably makes sense to do the importlib
change for now.
I'll try to write up how the current architecture works and some options for settings updates later today (I'm in US Pacific Time, so that'll probably be 6 to 12 hours from now)
I will create a PR tomorrow ;) Im CET (Germany).
I forgot that I had already written up a preliminary bug. I just added a fair bit of context to give more of the story of how things started and where they need to go.
To add to that, the main reason that tray_threading.py
attempts to re-import audio.py
is to force the audio-pipeline to be restarted using up-to-date configuration settings, when those settings might have just been changed. In practice, I believe this is already broken, but it probably makes sense to keep the re-import happening for now just to avoid potentially stacking breakages that manifest differently across different codepaths.
Hi there, As discussed in this [issue}(https://github.com/muammar/mkchromecast/issues/398) I noticed that when I installed mkchromecast, there were some issues, and it basically doesn't create the sound connector. I use Ubuntu 24.04 LTS and installed mkchromecast using
apt
. The traceback (see below for full traceback), denotesModuleNotFoundError: No module named 'imp'
which makes me wonder whether there might be a dependency issue. Also note that Ubuntu 24.04 LTS is now using python 3.12.4 for native python:I also found when doing a Google search that this is a general issue with supporting python 3.12.
Summary:
ModuleNotFoundError: No module named 'imp'
Details: Specs, Logs and Traceback of error
Specs
Logs
When I run
mkchromecast -t
I can follow the logs, that yield the following:At this stage I have selected some option, I get the same response for all 4 options:
Traceback:
Question
I would need some help, but I could definitely refactor this for the project if you want me too. I would need to know more about your process of forking and testing to ensure that my PR will be somewhat appropriate.
Feedback
This is my first time making an issue in this repo. Please let me know whether this format works for you :)
Thanks, I really appreciate your time!