-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Hot reload issue #116
Comments
I'll add this check in. xlOil hooks the import mechanism: in this case it looks like |
Thanks for the response. The library that is causing the issue is code generated by ZeroC Ice (https://zeroc.com/ice) which is an RPC framework. I did some more detailed debugging and found that at every package level the One thing though. I typed the fix from memory but made a mistake. The change I made was as follows: def watch_module(self, module: ModuleType):
if not module.__spec__:
return
filepath = module.__spec__.origin
if filepath == "frozen" or any((filepath.startswith(x) for x in self._ignore_paths)):
return
It is the |
That's poor design on their part: the python docs are clear that spec should always be set except for the main model. I'll add the check anyway since it's no problem on the xloil side. |
Currently running 0.18.7. Our Python code base contains some auto-generated code which we cannot change. The
watch_module
function in theImportHelper
class inimporter.py
fails as the supplied module parameter is set to None. No idea why that is the case. But the auto-generated code looks like the culprit. I "fixed" the problem by added a check for module as follows:This might have been resolved but because of limitation in my environment I cannot upgrade at the moment. Also can't really send you the code base so might be hard to impossible for you to replicate. Just hoping that this is a known issue and there is an easy solution.
The text was updated successfully, but these errors were encountered: