-
Notifications
You must be signed in to change notification settings - Fork 792
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
Newly created gen_py modules sometimes fail to import in Python 3 #1595
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When accessing a COM server using gen_py modules on demand, some modules randomly fail to import after they have been generated. This is highly machine-dependent; on most computers the problem does not manifest itself at all, but on some it is quite reproduceable, using e.g.
On some machines, this will throw a "module not found" exception after about 10 iterations.
The cause of the problem seems to be a breaking change in Python 3.3, which is documented at https://docs.python.org/3/library/importlib.html#importlib.import_module. Specifically, it is now necessary to call importlib.invalidate_caches before importing the newly generated module. I will attach a PR.
The text was updated successfully, but these errors were encountered: