Re: Error in setting up psycopg2

2009-09-08 Thread Jan Ostrochovsky
Hi Simon, I had also problems with psycopg2 on Mac OS X. First with development server (python manage.py runserver), and when solved, later also with Apache. Finally I decided for Linux on production server (with Apache), and let Mac OS X on development workstations (with runserver). If such se

Re: Error in setting up psycopg2

2009-08-26 Thread Thomas Guettler
Simon Lee schrieb: > Hi Thomas, ... > > I did a search on the web but found only two links on similar error > without any solution. Does anyone know what caused "Symbol not found: > _PQbackendPID"? > Try to to install a new version von psycopg2, since it seems to be broken. Try to use psyco

Re: Error in setting up psycopg2

2009-08-25 Thread Simon Lee
Error("Settings cannot be >  imported, because environment variable %s is undefined." % > ENVIRONMENT_VARIABLE)ImportError: Settings cannot be imported, because > environment variable DJANGO_SETTINGS_MODULE is undefined. > I searched "/Users/myname/mysite3/settings.py" for the varia

Re: Error in setting up psycopg2

2009-08-25 Thread Simon Lee
ESSION_ENGINE is defined??? Simon --- On Mon, 8/24/09, Thomas Guettler wrote: From: Thomas Guettler Subject: Re: Error in setting up psycopg2 To: "Simon Lee" , django-users@googlegroups.com Date: Monday, August 24, 2009, 11:17 PM Hi Simon, your first traceback looked like this: [Wed

Re: Error in setting up psycopg2

2009-08-24 Thread Thomas Guettler
Hi Simon, your first traceback looked like this: [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1] mod_wsgi (pid=120): Exception occurred processing WSGI script '/Users/myname/ mysite3/apache/myapp.wsgi'. [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1] Traceback (most recent call last)

Re: Error in setting up psycopg2

2009-08-23 Thread Thomas Guettler
Hi Simon, Simon Lee schrieb: > Thank you for being patient in helping me out. > > I checked it /etc/passwd and found this line which I think is the > reference for UID 70 > > _www:*:70:70:World Wide Web Server:/Library/WebServer:/usr/bin/false > > I did "su - _www" (I hope I did this right).

Re: Error in setting up psycopg2

2009-08-21 Thread Simon Lee
Thank you for being patient in helping me out. I checked it /etc/passwd and found this line which I think is the reference for UID 70 _www:*:70:70:World Wide Web Server:/Library/WebServer:/usr/bin/false I did "su - _www" (I hope I did this right). It still asked for a password which I entered m

Re: Error in setting up psycopg2

2009-08-21 Thread Randy Barlow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Lee declared: > Hi Thomas, > > Ok, I put in the "assert False, os.getuid()". The error log logged the > following: > > [Fri Aug 21 23:37:48 2009] [error] [client 127.0.0.1] assert > False, os.getuid() > [Fri Aug 21 23:37:48 2009] [error] [

Re: Error in setting up psycopg2

2009-08-21 Thread Simon Lee
Hi Thomas, Ok, I put in the "assert False, os.getuid()". The error log logged the following: [Fri Aug 21 23:37:48 2009] [error] [client 127.0.0.1] assert False, os.getuid() [Fri Aug 21 23:37:48 2009] [error] [client 127.0.0.1] AssertionError: 70 Then, I go the shell and entered "su - 70". I

Re: Error in setting up psycopg2

2009-08-20 Thread Thomas Guettler
Hi Simon, it could be a permission problem: in the code do something like assert False, os.getuid(). then on the shell, you need get this user: su - corresponding-user id # check if you have this UID #try to open the file: more /.../tz.py HTH, Thomas Simon Lee schrieb: > tz.py is in the di

Re: Error in setting up psycopg2

2009-08-20 Thread Simon Lee
tz.py is in the directory: "'/Library/Frameworks/Python.framework/ Versions/2.6/lib/python2.6/site-packages/psycopg2" which is in the sys.path list. Why does the import still fail? Please advise. Simon On Aug 20, 4:37 pm, Thomas Guettler wrote: > The important part: cannot import tz. > > Maybe

Re: Error in setting up psycopg2

2009-08-20 Thread Thomas Guettler
The important part: cannot import tz. Maybe you need to install it. I don't this module. Thomas Simon Lee schrieb: > Hi Thomas, > > Tried your method and modified /mysite3/apache/myapp.wsgi as followed: > > import os, sys > sys.path.append('/Users/myname') > sys.path.append('/Library/Framew

Re: Error in setting up psycopg2

2009-08-19 Thread Simon Lee
Hi Thomas, Tried your method and modified /mysite3/apache/myapp.wsgi as followed: import os, sys sys.path.append('/Users/myname') sys.path.append('/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/django') sys.path.append('/Library/Frameworks/Python.framework/Version

Re: Error in setting up psycopg2

2009-08-19 Thread Thomas Guettler
Hi, you need to know what sys.path looks like. This is a list of searched directories. try: import # Import lines that failes except ImportError, exc: import sys raise ImportError('%s %s' % (exc, sys.path)) Then check if the stuff you want to import is on sys.path. Simon Lee s

Error in setting up psycopg2

2009-08-18 Thread Simon Lee
I am trying to set up a simple test website in the Apache Server that comes with OSX 10.5.8 and continuously ran into errors that complainted about not able to import something in pscycopg2. The site works if I ran with the django development server. When I port to Apache, it did not work. Can som