Skip to content

Conversation

@dotku
Copy link

@dotku dotku commented Nov 13, 2025

Purpose

Improve error message for import exception group

References

#14056 (#14056)

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this improve the status quo?

A

@AA-Turner AA-Turner added the awaiting:response Waiting for a response from the author of this issue label Nov 13, 2025
@dotku
Copy link
Author

dotku commented Nov 13, 2025

Just make it more friendly error message reading according to the related issue.

Won't able to find the module doesn't means the module is not exited.

@flying-sheep
Copy link
Contributor

flying-sheep commented Nov 20, 2025

Yeah, as I said in #14056: “no module named thing” doesn’t necessarily make sense.

Imagine thing is very much a module in sys.path, but its import failed because of some exception during module execution (ImportError or otherwise). Then “no module named thing” is just wrong, while “could not import thing” is correct and therefore not confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting:response Waiting for a response from the author of this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants