Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encounters an error #484

Open
26th opened this issue Oct 15, 2018 · 5 comments
Open

Encounters an error #484

26th opened this issue Oct 15, 2018 · 5 comments

Comments

@26th
Copy link

26th commented Oct 15, 2018

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'

@vbhayden
Copy link
Member

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

@26th
Copy link
Author

26th commented Oct 20, 2018

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

I used ubuntu14.04

@26th
Copy link
Author

26th commented Oct 20, 2018

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

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'

@damien-r
Copy link

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

@ThisIsVegas
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants