ADL_LRS
ADL_LRS copied to clipboard
Encounters an error
I want to run code (env) abc@ubuntu:~/ADL_LRS$ fab setup_lrs
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/fabric/main.py", line743, in main
*args, **kwargs
File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line405, in execute
results['<local-only>'] = task.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line171, in run
return self.wrapped(*args, **kwargs)
File "/home/abc/ADL_LRS/fabfile.py", line53, in setup_lrs
adldir = settings.MEDIA_ROOT
File "/home/abc/ADL_LRS/../env/lib/python2.7/site-packages/django/conf/__init__.py", line55, in __getattr__
self._setup(name)
File "/home/abc/ADL_LRS/../env/lib/python2.7/site-packages/django/conf/__init__.py", line43, in __setup
self._wrapped = Settings(settings_module)
File "/home/abc/ADL_LRS/../env/lib/python2.7/site-packages/django/conf/__init__.py", line99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line37, in import_module
__import__(name)
File "/home/abc/ADL_LRS/adl_lrs/settings.py", line15, in <module>
DEBUG = config.getboolean('debug', 'DEBUG')
File "/usr/lib/python2.7/ConfigParser.py", line368, in getboolean
v
= self.get(section, option)
File "/usr/lib/python2.7/ConfigParser.py", line330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'debug'
I change the settings.py
DEBUG = config.getboolean('debug', 'DEBUG') to DEBUG = True
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/fabric/main.py", line743, in main
*args, **kwargs
File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line405, in execute
results['<local-only>'] = task.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line171, in run
return self.wrapped(*args, **kwargs)
File "/home/abc/ADL_LRS/fabfile.py", line53, in setup_lrs
adldir = settings.MEDIA_ROOT
File "/home/abc/ADL_LRS/../env/lib/python2.7/site-packages/django/conf/__init__.py", line55, in __getattr__
self._setup(name)
File "/home/abc/ADL_LRS/../env/lib/python2.7/site-packages/django/conf/__init__.py", line43, in __setup
self._wrapped = Settings(settings_module)
File "/home/abc/ADL_LRS/../env/lib/python2.7/site-packages/django/conf/__init__.py", line99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python2.7/importlib/__init__.py", line37, in import_module
__import__(name)
File "/home/abc/ADL_LRS/adl_lrs/settings.py", line21, in <module>
EMAIL_BACKEND = config.get('email', 'EMAIL_BACKEND')
File "/usr/lib/python2.7/ConfigParser.py", line330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'email'
This happens sometimes and I'm not sure why either. What OS (and maybe line endings) are you using?
这有时发生,我也不确定为什么。您使用的操作系统(以及可能的行结尾)是什么?
I used ubuntu14.04
这有时发生,我也不确定为什么。您使用的操作系统(以及可能的行结尾)是什么?
What would you do if you had this problem
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/fabric/main.py", line743, in main
*args, **kwargs
File "/usr/lib/python2.7/dist-packages/fabric/tasks.py", line405, in execute
results['
Hello,
I had the same problem and then saw that my settings.ini file was in wrong directory. It would be nice to have a more explicit error in adl_lrs/settings.py, like
file = "SETTINGS_DIR+'/setting.ini'" if not file exists (file) print "file " + file + " not found. Please consult the wiki and create one"
or something like that
I might be late but your settings.ini
might be in the wrong directory. You must place the settings.ini
in /adl_lrs/
dir where settings.py
exists.