Re: error psycopg in Django/MacOSX
Daniel França <[email protected]> Tue, 3 Aug 2010 11:59:21 -0300
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Daniele, I'm not at home right now(where the error happens), but I'll try to explain. I'm using psycopg2 w/ django. in django there's a timezone env. variable that I set in a settings file. something like this: TIMEZONE=3D"US/Eastern" the problem is, whatever I put there I get a message error like this: "Can't adapt type 'US/Eastern'" if I change to TIMEZONE=3D"America/Sao_Paulo" I get: "Can't adapt type 'America/Sao_Paulo'" it was working fine this way in GNU/Linux, but now in Mac OSX I got this error. Perhaps it's something internal to django framework? 2010/8/3 Daniele Varrazzo <[email protected]>: > 2010/8/3 Daniel Fran=E7a <[email protected]>: >> ok, this error doesn't happen anymore, I installed python32bits >> My website is running, but when I try to insert some data at the >> database I get the error: >> Can't adapt type <<timezone>> >> I tried to use timezone as 'US/Eastern', 'America/Sao_Paulo' >> but the problem remains. >> Maybe it's because my postgresql is 64 bits? How do I know if it is? >> can anyone help me? > > Hello, > > no, you are past the 32/64 bits problem: now psycopg seems running fine. > > Psycopg doesn't know what the object you are trying to pass to the > query is (timezone). Is it a class of yours or something else? Can you > provide an example of the query you are trying to run and the objects > you are passing it? > > I don't think postgres has a "timezone" data type: maybe you want to > save a timestamp with time zone instead. > > Regards, > > -- Daniele >