473,324 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

pytz2007c error

Hi,
Why this error ?
>>from pytz import timezone
eastern = timezone('US/Eastern')
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\__init__.py", line 93, in timezone
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\tzfile.py", line 33, in build_tzinfo
for trans in data[:timecnt]]
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\tzinfo.py", line 27, in memorized_datetime
dt = datetime.utcfromtimestamp(seconds)
ValueError: timestamp out of range for platform localtime()/gmtime()
function

I'm running python 2.5 on WinXP French with the egg from CheeseShop.

Same error with all timezone (like timezone('Europe/Zurich'),
timezone('Europe/Amsterdam'), ...) except a few one:
>>print timezone('UTC')
UTC

Is this a pytz problem or something I didn't understand ?

Mar 6 '07 #1
3 1476
On Mar 6, 9:51 am, "looping" <kad...@gmail.comwrote:
Hi,
Why this error ?
>from pytz import timezone
eastern = timezone('US/Eastern')

Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\__init__.py", line 93, in timezone
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\tzfile.py", line 33, in build_tzinfo
for trans in data[:timecnt]]
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\tzinfo.py", line 27, in memorized_datetime
dt = datetime.utcfromtimestamp(seconds)
ValueError: timestamp out of range for platform localtime()/gmtime()
function

I'm running python 2.5 on WinXP French with the egg from CheeseShop.

Same error with all timezone (like timezone('Europe/Zurich'),
timezone('Europe/Amsterdam'), ...) except a few one:>>print timezone('UTC')

UTC

Is this a pytz problem or something I didn't understand ?
OK, the error come from datetime.utcfromtimestamp that doesn't support
negative value.
pytz try to pass -1633280400 to this function.

Is this a problem from Windows ?

Mar 6 '07 #2
En Tue, 06 Mar 2007 06:41:59 -0300, looping <ka****@gmail.comescribió:
On Mar 6, 9:51 am, "looping" <kad...@gmail.comwrote:
>>
>>from pytz import timezone
eastern = timezone('US/Eastern')

I'm running python 2.5 on WinXP French with the egg from CheeseShop.

Same error with all timezone (like timezone('Europe/Zurich'),
timezone('Europe/Amsterdam'), ...) except a few one:>>print
timezone('UTC')

UTC

Is this a pytz problem or something I didn't understand ?

OK, the error come from datetime.utcfromtimestamp that doesn't support
negative value.
pytz try to pass -1633280400 to this function.

Is this a problem from Windows ?
Perhaps it's a problem in pytz trying to go too far in the past...
-1633280400 refers to a date around 1919.

--
Gabriel Genellina

Mar 6 '07 #3
looping wrote:
On Mar 6, 9:51 am, "looping" <kad...@gmail.comwrote:
>Hi,
Why this error ?
>>>>from pytz import timezone
eastern = timezone('US/Eastern')
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\__init__.py", line 93, in timezone
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\tzfile.py", line 33, in build_tzinfo
for trans in data[:timecnt]]
File "C:\Python25\lib\site-packages\pytz-2007c-py2.5.egg\pytz
\tzinfo.py", line 27, in memorized_datetime
dt = datetime.utcfromtimestamp(seconds)
ValueError: timestamp out of range for platform localtime()/gmtime()
function

I'm running python 2.5 on WinXP French with the egg from CheeseShop.

Same error with all timezone (like timezone('Europe/Zurich'),
timezone('Europe/Amsterdam'), ...) except a few one:>>print timezone('UTC')

UTC

Is this a pytz problem or something I didn't understand ?
OK, the error come from datetime.utcfromtimestamp that doesn't support
negative value.
pytz try to pass -1633280400 to this function.

Is this a problem from Windows ?
Looks like it. I've opened a bug.

https://bugs.beta.launchpad.net/pytz/+bug/90096

Current workaround is to use an earlier release. This will be fixed as pytz
needs to remain cross platform.

--
Stuart Bishop <st****@stuartbishop.net>
http://www.stuartbishop.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFF7WKxAfqZj7rGN0oRAt8uAKCZ+VlXBXoFMoOUo8CPjU pEYWs2rQCfZ0Rg
CT63WeikMGEURtduMdQ/m3Q=
=yY/3
-----END PGP SIGNATURE-----

Mar 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
1
by: Aravind | last post by:
we have two files: 1. rc4.c (defines one function "create_pin()") 2. MyImpl.c(calling the function "create_pin()"),This implements JNI method. 1.When I am trying to create .dll file with one...
1
by: yanwan | last post by:
I met this problem in executing a c++ project in visual studio. Does anyone have suggestions to resolve "error lnk 2001"? --------------------Configuration: reconstruction - Win32...
5
by: Enos Meroka | last post by:
Hallo, I am a student doing my project in the university.. I have been trying to compile the program using HP -UX aCC compiler, however I keep on getting the following errors. ...
13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.