mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-30 01:10:00 +00:00
Error messages (#10894)
* Add INVE-E14 - Error in config file * Add INVE-E14 * Fix duplicate code * Fix numbering
This commit is contained in:
@@ -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.
|
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)
|
### INVE-W (InvenTree Warning)
|
||||||
Warnings - These are non-critical errors which should be addressed when possible.
|
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
|
#### INVE-W10
|
||||||
**Config not in recommended directory - Backend**
|
**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.
|
The warning text will show the recommended directory for your deployment method.
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,9 @@ def load_config_data(set_cache: bool = False) -> map | None:
|
|||||||
data = yaml.safe_load(cfg)
|
data = yaml.safe_load(cfg)
|
||||||
except yaml.parser.ParserError as error:
|
except yaml.parser.ParserError as error:
|
||||||
logger.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)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ def main():
|
|||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
except ImportError as exc: # pragma: no cover
|
except ImportError as exc: # pragma: no cover
|
||||||
raise ImportError(
|
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 '
|
'available on your PYTHONPATH environment variable? Did you '
|
||||||
'forget to activate a virtual environment?'
|
'forget to activate a virtual environment?'
|
||||||
) from exc
|
) from exc
|
||||||
|
|||||||
Reference in New Issue
Block a user