You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thanks a stack for maintaining this package. I just used it for the very first time, and copied the snippet from the README as advertised, and how I expected it to work out of the box. Using a try/except on an ImportError is usually what we are all used to do since ages, right?
Now I was baffled to find that in this case, Python 3.8 reports a ModuleNotFoundError. I think it probably always have been like that, ImportError would only be raised in from abc import foo-style cases, where the top-level package module exists, but not a submodule.
I just wanted to make sure you agree on this before I would submit a corresponding patch to the README.
ModuleNotFoundError is a subclass of ImportError. You can catch either ImportError or ModuleNotFoundError, and I tend to just always catch ImportError. I'm not sure that the README needs to be updated.
oh you are right. I don't know why this issue happened to me. I will close it and may come back to it when I will be able to re-evaluate the problems I've observed, if any.
As expected, everything works flawlessly when using ImportError again with crate/crate-python@4d655b6c2, tested on behalf of crate/crate-python#466. I don't know what went wrong before, so again sorry for the noise.
Dear Paul,
thanks a stack for maintaining this package. I just used it for the very first time, and copied the snippet from the README as advertised, and how I expected it to work out of the box. Using a try/except on an
ImportError
is usually what we are all used to do since ages, right?Now I was baffled to find that in this case, Python 3.8 reports a
ModuleNotFoundError
. I think it probably always have been like that,ImportError
would only be raised infrom abc import foo
-style cases, where the top-level package module exists, but not a submodule.I just wanted to make sure you agree on this before I would submit a corresponding patch to the README.
With kind regards,
Andreas.
Reproduction
The text was updated successfully, but these errors were encountered: