mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Covered more error messages when the setting file won't load in the managerCovered more error messages when the setting file won't load in the manager..
This commit is contained in:
parent
2c4af9076d
commit
cbcb13feb1
1 changed files with 7 additions and 3 deletions
|
|
@ -102,24 +102,28 @@ from src.settings_default import *
|
|||
Welcome to Evennia (version %(version)s)!
|
||||
We created a fresh settings.py file for you.""" % {'version': VERSION}
|
||||
|
||||
# i18n
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
#------------------------------------------------------------
|
||||
# Test the import of the settings file
|
||||
#------------------------------------------------------------
|
||||
try:
|
||||
# i18n
|
||||
from django.utils.translation import ugettext as _
|
||||
from game import settings
|
||||
except Exception:
|
||||
import traceback
|
||||
string = "\n" + traceback.format_exc()
|
||||
string += _("""\n
|
||||
Error: Couldn't import the file 'settings.py' in the directory
|
||||
containing %(file)r. There can be two reasons for this:
|
||||
containing %(file)r. There are usually two reasons for this:
|
||||
1) You moved your settings.py elsewhere. In that case move it back or
|
||||
create a link to it from this folder.
|
||||
2) The settings module is where it's supposed to be, but contains errors.
|
||||
Review the traceback above to resolve the problem, then try again.
|
||||
3) If you get errors on finding DJANGO_SETTINGS_MODULE you might have
|
||||
set up django wrong in some way. If you run a virtual machine, it might be worth
|
||||
to restart it to see if this resolves the issue. Evennia should not require you
|
||||
to define any environment variables manually.
|
||||
""") % {'file': __file__}
|
||||
print string
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue