I tried to launch my OSQA site with gunicorn (http://gunicorn.org/), but I got this error:

File "/home/nico/www/arts-factory.fr/photo/forum/modules/__init__.py", line 12, in get_modules_script                                                                                                                                            
for m in django_settings.MODULE_LIST:                                                                                                                                                                                                          
File "/home/nico/www/arts-factory.fr/envs/photo/lib/python2.6/site-packages/django/utils/functional.py", line 277, in __getattr__                                                                                                                
return getattr(self._wrapped, name)                                                                                                                                                                                                            
AttributeError: 'Settings' object has no attribute 'MODULE_LIST'

That works with a simple:

python manage.py runserver

I tried to fix it with this answer (http://meta.osqa.net/questions/9722/from-djangoconf-import-settings-isnt-importing-settingspy), but it's not the solution.

asked 22 Aug '11, 09:11

nico91's gravatar image

nico91
6113
accept rate: 0%

Was looking at http://gunicorn.org/ and they seem to have launched a new version today, and the release notes mentions something about a fix around django settings. Maybe that's your problem and has nothing to do with OSQA. Give a try to that new version, and maybe that will help you.

(22 Aug '11, 09:15) Hernani Cerq... ♦♦

I tried with the v0.10.0, and the new one (v0.13.0), no differences. Tried on MacOS and on Debian. (I have a virtualenv)

(22 Aug '11, 09:23) nico91

@nico91, this posting is more a problem report than a question. OSQA bugs should be reported at jira.osqa.net, and OSQA support issues should go to support@osqa.net. In any case, please edit the posting title to make it a proper question.

(22 Aug '11, 09:29) rickross ♦♦

Although this seems to me that @nico91 is using a costumized settings file, I don't see another reason for gunicorn to fail to load that setting. Either that, or unicorn as some serious issues... @nico, can you link us a pastebin of your settings file? Don't forget to obfuscate any sensitive info you may have there.

(22 Aug '11, 09:38) Hernani Cerq... ♦♦

The problem was resulted by Gunicorn trying to load all the resources before populating the settings file.

We've pushed a fast fix for your issue to the trunk, so consider updating to the latest revision: http://svn.osqa.net/changelog/OSQA/?cs=1163 and after that use the Gunicorn Django management command. It worked for me perfectly.

python manage.py run_gunicorn
link

answered 22 Aug '11, 10:16

Jordan's gravatar image

Jordan ♦♦
3.1k618
accept rate: 39%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×45
×30
×5

Asked: 22 Aug '11, 09:11

Seen: 649 times

Last updated: 22 Aug '11, 10:16

powered by OSQA