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
py_compile.compile: AttributeError on importlib.utils #80814
Comments
The following code in py_compile.compile fails (tested on 3.6.6 and 3.7.3) with tracebacks that end like the one shown at the bottom. There's an AttributeError about importlib.utils. """ Sample tail end of traceback: """ |
Can you please add a simplified script to reproduce this and possibly without any external dependencies? Looking at the traceback it seems to come from the project chameleon at https://github.com/malthe/chameleon/blob/983877e628a75f42c473cb2ea2350fb0727eb85b9/src/chameleon/loader.py#L177 . The file seems standalone without some helper functions from utils file. |
Thank you for the prompt reply. It turns out this is not a bug in py_compile. Other code we use imports importlib.util briefly for a quick check at module level and then deletes it, also at module scope. Removing the deletion fixes the issue. Thanks again and apologies! |
No problem, closing the issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: