Saturday, August 31, 2013

Re: Problems using django 1.6.x and uwsgi

Hi Rafael,

Rafael Reuber <rafaelreuber@gmail.com> writes:
> I'm working on a project that needs a feature that it's only available on
> the 1.6.x version. But I'm having problems when I run it using uswgi.
> Apparently it could be a bug on 1.6.x because when I run the project using
> 1.5.x the error doesn't appear.
>
> uwsgi --http :8000 --wsgi-file drover/wsgi.py
> ...
> line 49, in _setup
> self._wrapped = Settings(settings_module)
> File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py",
> line 132, in __init__
> % (self.SETTINGS_MODULE, e)
> ImportError: Could not import settings 'drover.settings' (Is it on
> sys.path? Is there an import error in the settings file?): cannot import
> name BaseHandler

python cannot find the settings module. That might be caused by the
change of the project layout. When you run django_admin shell, is python
able to import the settings moduke?


You might want to set PYTHONPATH;

uswgi .., --env PYTHONPATH=...


Alternativly, I'd suggest to use virtualenv/pip. It saves you from a lot
of hassles in the long run, especially when you have to deal with
multiple projects or multiple versions at the same time.


Kind regards

Michael

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment