Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » new user having trouble connecting django to postgres with psycopg2 [RSS Feed]

#1 Jan. 7, 2011 01:16:22

Mark B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

new user having trouble connecting django to postgres with psycopg2


hi,

I've been trying to find the answer to this for a bit, but haven't
found anything suitable.

I have postgresql 9.01, django 1.2.3 psycopg2 on ubuntu10.10

When I try to use syncdb i get an error as follows

"psycopg2.DataError: unrecognized time zone name"

I currently have my settings.py set to "Australia/Sydney".

I logged into postgres and set the TZ variable to AEST and started the
database.

But still get this.

I'm guessing it is something simple, but cannot find the answer.

Any ideas would be great,
Thanks,
Mark.

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 7, 2011 06:43:43

Subhranath C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

new user having trouble connecting django to postgres with psycopg2


I guess you'll have to set it to 'Australia/ACT Australia/Canberra
Australia/NSW Australia/Sydney' in your settings.py instead.

Thanks,
Subhranath Chunder.


On Fri, Jan 7, 2011 at 6:22 AM, Mark Brazil <markbra...@gmail.com> wrote:

> hi,
>
> I've been trying to find the answer to this for a bit, but haven't
> found anything suitable.
>
> I have postgresql 9.01, django 1.2.3 psycopg2 on ubuntu10.10
>
> When I try to use syncdb i get an error as follows
>
> "psycopg2.DataError: unrecognized time zone name"
>
> I currently have my settings.py set to "Australia/Sydney".
>
> I logged into postgres and set the TZ variable to AEST and started the
> database.
>
> But still get this.
>
> I'm guessing it is something simple, but cannot find the answer.
>
> Any ideas would be great,
> Thanks,
> Mark.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 9, 2011 04:19:41

Mark B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

new user having trouble connecting django to postgres with psycopg2


Same error

Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_manager(settings)File"/usr/lib/pymodules/python2.6/django/core/management/__init__.py", line438, in execute_managerutility.execute()File"/usr/lib/pymodules/python2.6/django/core/management/__init__.py", line379, in executeself.fetch_command(subcommand).run_from_argv(self.argv)File "/usr/lib/pymodules/python2.6/django/core/management/base.py",line 191, in run_from_argvself.execute(*args, **options.__dict__)File "/usr/lib/pymodules/python2.6/django/core/management/base.py",line 220, in executeoutput = self.handle(*args, **options)File "/usr/lib/pymodules/python2.6/django/core/management/base.py",line 351, in handlereturn self.handle_noargs(**options)File"/usr/lib/pymodules/python2.6/django/core/management/commands/syncdb.py", line52, in handle_noargscursor = connection.cursor()File "/usr/lib/pymodules/python2.6/django/db/backends/__init__.py",line 75, in cursorcursor = self._cursor()File"/usr/lib/pymodules/python2.6/django/db/backends/postgresql_psycopg2/base.py",line 144, in _cursorcursor.execute("SET TIME ZONE %s", [settings_dict])
psycopg2.DataError: unrecognized time zone name: "Australia/NSW"

or if its set to Sydney
:
:
:
psycopg2.DataError: unrecognized time zone name: "Australia/Sydney"




On 07/01/11 17:43, Subhranath Chunder wrote:I guess you'll have to set it to 'Australia/ACT Australia/CanberraAustralia/NSW Australia/Sydney' in your settings.py instead.Thanks,
Subhranath Chunder.On Fri, Jan 7, 2011 at 6:22 AM, Mark Brazil <markbra...@gmail.com<mailto:markbra...@gmail.com>> wrote:hi,

I've been trying to find the answer to this for a bit, but haven't
found anything suitable.

I have postgresql 9.01, django 1.2.3 psycopg2 on ubuntu10.10

When I try to use syncdb i get an error as follows

"psycopg2.DataError: unrecognized time zone name"

I currently have my settings.py set to "Australia/Sydney".

I logged into postgres and set the TZ variable to AEST and started the
database.

But still get this.

I'm guessing it is something simple, but cannot find the answer.

Any ideas would be great,
Thanks,
Mark.

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
<mailto:django-users@googlegroups.com>.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
<mailto:django-users%2bunsubscr...@googlegroups.com>.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.


--You received this message because you are subscribed to the GoogleGroups "Django users" group.To post to this group, send email to django-us...@googlegroups.com.To unsubscribe from this group, send email todjango-users+unsubscr...@googlegroups.com.For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 9, 2011 04:53:23

Jeff T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

new user having trouble connecting django to postgres with psycopg2


Can you try logging into the database and running:

SELECT * FROM pg_timezone_names;

Maybe try picking something from that list?

-Jeff

On Sat, Jan 8, 2011 at 8:19 PM, Mark Brazil <markbra...@gmail.com> wrote:
> Same error
>
> Traceback (most recent call last):
>   File "manage.py", line 11, in <module>
>     execute_manager(settings)
>   File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",
> line 438, in execute_manager
>     utility.execute()
>   File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",
> line 379, in execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line
> 191, in run_from_argv
>     self.execute(*args, **options.__dict__)
>   File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line
> 220, in execute
>     output = self.handle(*args, **options)
>   File "/usr/lib/pymodules/python2.6/django/core/management/base.py", line
> 351, in handle
>     return self.handle_noargs(**options)
>   File
> "/usr/lib/pymodules/python2.6/django/core/management/commands/syncdb.py",
> line 52, in handle_noargs
>     cursor = connection.cursor()
>   File "/usr/lib/pymodules/python2.6/django/db/backends/__init__.py", line
> 75, in cursor
>     cursor = self._cursor()
>   File
> "/usr/lib/pymodules/python2.6/django/db/backends/postgresql_psycopg2/base.py",
> line 144, in _cursor
>     cursor.execute("SET TIME ZONE %s", [settings_dict])
> psycopg2.DataError: unrecognized time zone name: "Australia/NSW"
>
> or if its set to Sydney
> :
> :
> :
> psycopg2.DataError: unrecognized time zone name: "Australia/Sydney"
>
>
>
>
> On 07/01/11 17:43, Subhranath Chunder wrote:
>
> I guess you'll have to set it to 'Australia/ACT Australia/Canberra
> Australia/NSW Australia/Sydney' in your settings.py instead.
> Thanks,
> Subhranath Chunder.
>
> On Fri, Jan 7, 2011 at 6:22 AM, Mark Brazil <markbra...@gmail.com> wrote:
>>
>> hi,
>>
>> I've been trying to find the answer to this for a bit, but haven't
>> found anything suitable.
>>
>> I have postgresql 9.01, django 1.2.3 psycopg2 on ubuntu10.10
>>
>> When I try to use syncdb i get an error as follows
>>
>> "psycopg2.DataError: unrecognized time zone name"
>>
>> I currently have my settings.py set to "Australia/Sydney".
>>
>> I logged into postgres and set the TZ variable to AEST and started the
>> database.
>>
>> But still get this.
>>
>> I'm guessing it is something simple, but cannot find the answer.
>>
>> Any ideas would be great,
>> Thanks,
>> Mark.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » new user having trouble connecting django to postgres with psycopg2 [RSS Feed]

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support