ADL_LRS icon indicating copy to clipboard operation
ADL_LRS copied to clipboard

Encounters an error

Open 26th opened this issue 6 years ago • 5 comments

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'

26th avatar Oct 15 '18 09:10 26th

This happens sometimes and I'm not sure why either. What OS (and maybe line endings) are you using?

vbhayden avatar Oct 17 '18 14:10 vbhayden

这有时发生,我也不确定为什么。您使用的操作系统(以及可能的行结尾)是什么?

I used ubuntu14.04

26th avatar Oct 20 '18 12:10 26th

这有时发生,我也不确定为什么。您使用的操作系统(以及可能的行结尾)是什么?

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[''] = 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 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'

26th avatar Oct 20 '18 12:10 26th

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

damien-r avatar Mar 19 '19 12:03 damien-r

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.

ThisIsVegas avatar Oct 28 '19 09:10 ThisIsVegas