diff --git a/docs/docs/settings/error_codes.md b/docs/docs/settings/error_codes.md index 057fedabd2..75dc200d80 100644 --- a/docs/docs/settings/error_codes.md +++ b/docs/docs/settings/error_codes.md @@ -83,6 +83,18 @@ This is a security measure to prevent plugins from changing the core functionali An error occurred when discovering or initializing a machine type from a plugin. This likely indicates a faulty or incompatible plugin. +#### INVE-E13 + +**Error reading InvenTree configuration file** + +An error occurred while reading the InvenTree configuration file. This might be caused by a syntax error or invalid value in the configuration file. + +#### INVE-E14 + +**Could not import Django** + +Django is not installed in the current Python environment. This means that the InvenTree backend is not running within the correct [python virtual environment](../start/index.md#virtual-environment) or that the required Python packages were not installed correctly. + ### INVE-W (InvenTree Warning) Warnings - These are non-critical errors which should be addressed when possible. @@ -153,7 +165,7 @@ The warning text will show the recommended command for intended use. #### INVE-W10 **Config not in recommended directory - Backend** -A configuration file is not in the recommended directory. This might lead to issues with the deployment method you are using. It might also lead to confusinon. +A configuration file is not in the recommended directory. This might lead to issues with the deployment method you are using. It might also lead to confusion. The warning text will show the recommended directory for your deployment method. diff --git a/src/backend/InvenTree/InvenTree/config.py b/src/backend/InvenTree/InvenTree/config.py index 0f0770ab1f..7392543441 100644 --- a/src/backend/InvenTree/InvenTree/config.py +++ b/src/backend/InvenTree/InvenTree/config.py @@ -200,7 +200,9 @@ def load_config_data(set_cache: bool = False) -> map | None: data = yaml.safe_load(cfg) except yaml.parser.ParserError as error: logger.error( - "Error reading InvenTree configuration file '%s': %s", cfg_file, error + "INVE-E13: Error reading InvenTree configuration file '%s': %s", + cfg_file, + error, ) sys.exit(1) diff --git a/src/backend/InvenTree/manage.py b/src/backend/InvenTree/manage.py index bc489b085a..988cd61e3f 100755 --- a/src/backend/InvenTree/manage.py +++ b/src/backend/InvenTree/manage.py @@ -13,7 +13,7 @@ def main(): from django.core.management import execute_from_command_line except ImportError as exc: # pragma: no cover raise ImportError( - "Couldn't import Django. Are you sure it's installed and " + "INVE-E14: Could not import Django. Are you sure it's installed and " 'available on your PYTHONPATH environment variable? Did you ' 'forget to activate a virtual environment?' ) from exc