Skip to main content

change the message in ModuleNotFoundError

Project description

friendly_module_not_found_error

This is a Python package that provides a custom exception class for handling module not found errors in a friendly way.

Installation

To install the package, run the following command:

pip install friendly_module_not_found_error

Usage

Don't need to import the packages. The pth file is already in the site-packages folder.

You can use the code to test the effects of the package:

import ant

The message raised will change to : "No module named 'ant'. Did you mean 'ast'?"

import multiprocessing.dumy

The message raised will change to : "module 'multiprocessing' has no child module 'dumy'. Did you mean 'dummy'?"

You can also run "test/test.py" to test the effects of the python.

require

python3.12+

Below it, the suggestion cannot be supported. The change that python suggest the similar name in "traceback.py" is in "3.12".

License

This package is licensed under the MIT License. See the LICENSE file for more information.

issues

If you have any questions or suggestions, please open an issue on GitHub.

Contributing

Contributions are welcome! Please submit a pull request with your changes.

Note

If a module that is not a package contains submodules, and those submodules also contain their own submodules, this nested module structure is not supported. When this situation occurs, you should reorganize the code using proper package structure. This approach violates Python's packaging best practices and should be avoided.

Credits

This package was created by [Locked-chess-official] and is maintained by [Locked-chess-official].

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

friendly_module_not_found_error-0.1.1.tar.gz (73.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

friendly_module_not_found_error-0.1.1-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

Details for the file friendly_module_not_found_error-0.1.1.tar.gz.

File metadata

File hashes

Hashes for friendly_module_not_found_error-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9ad33fae53bfdf4b043c0d2b6ff8b0c877de3b6d56efb2e22d03270eeb7f7919
MD5 19d7ae31069145cc42c7e8b9ed4fe9eb
BLAKE2b-256 d020a175e54c0dea6d8c20704a305a4b6b87f44c991d72e229bb3287b1af2c00

See more details on using hashes here.

File details

Details for the file friendly_module_not_found_error-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for friendly_module_not_found_error-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c99e273792d39a9de0fd01c86758bf0489a38a3cc327b871472268ab3b52918
MD5 d54d766881a826b81acd4ad1261a2ec6
BLAKE2b-256 c28868f2c01c36ce4c5aee53077ac5308a7d2e06c24b2a0ead6dd9e1c5b803ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page