Re: Problems using django 1.6.x and uwsgi

2013-08-31 Thread Michael Radziej
Hi Rafael,

Rafael Reuber  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+unsubscr...@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.


Problems using django 1.6.x and uwsgi

2013-08-27 Thread Rafael Reuber

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


*** Starting uWSGI 1.9.14 (64bit) on [Tue Aug 27 13:00:10 2013] ***
compiled with version: 4.7.3 on 23 August 2013 13:35:22
os: Linux-3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013
nodename: s0120704
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/u30941/drover
detected binary path: /usr/local/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 7811
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
uWSGI http bound on :8000 fd 4
spawned uWSGI http 1 (pid: 2362)
uwsgi socket 0 bound to TCP address 127.0.0.1:56867 (port auto-assigned) fd 
3
Python version: 2.7.4 (default, Apr 19 2013, 18:30:41)  [GCC 4.7.3]
*** Python threads support is disabled. You can enable it with 
--enable-threads ***
Python main interpreter initialized at 0x11dc180
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72776 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
Traceback (most recent call last):
  File "drover/wsgi.py", line 27, in 
from django.core.wsgi import get_wsgi_application
  File "/usr/local/lib/python2.7/dist-packages/django/core/wsgi.py", line 
1, in 
from django.core.handlers.wsgi import WSGIHandler
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 
11, in 
from django.core.handlers import base
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 
12, in 
from django.db import connections, transaction
  File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 
83, in 
signals.request_started.connect(reset_queries)
  File 
"/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", 
line 88, in connect
if settings.DEBUG:
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
line 54, in __getattr__
self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.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
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 2361, cores: 1)

-- 
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+unsubscr...@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.