-
Notifications
You must be signed in to change notification settings - Fork 784
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
initial module import in REPL is raising ImportError
for multiple initialization
#2644
Comments
@jdiggans-twist our |
ImportError
ImportError
for multiple initialization
For clarity, initialization means "create the module object". I deliberately chose not to use the word "import" in the error message because caching in Suggestions for alternative wording always welcome. |
Thanks @davidhewitt - your explanation makes sense. Re: the code I used in terms of MWE, this was taken directly from #759 (comment):
Moving to the version in
and let me re-upgrade to PyO3 v0.17.1 - thank you for the help and pointer! |
Aha great - yes |
After
maturin develop
and attemptingimport supermodule.submodule
in a REPL I'm now getting:I don't see any issues in this repo on this particular error (multiple initialization) - any idea where I've gone wrong?
(I see from https://github.com/PyO3/pyo3/blob/7bdc504252a2f972ba3490c44249b202a4ce6180/guide/src/migration.md#each-pymodule-can-now-only-be-initialized-once-per-process that this is new behavior as of the 28 August release of 0.17 but it's not clear from that writeup what 'the ability to initialize a #[pymodule] more than once in the same process' means - i.e. I am just starting a REPL and importing the package one time to trigger the error).
Originally posted by @jdiggans-twist in #759 (comment)
The text was updated successfully, but these errors were encountered: