473,396 Members | 1,748 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,396 software developers and data experts.

Need help for the error "OverflowError: long int too large to convert to int"

1
Hi,

Need help for the error "OverflowError: long int too large to convert to int" while reading a zip file content.
Python version:
Python 2.4.1 (#1, Sep 13 2005, 00:39:20)
[GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2

Code
>>> import os, datetime, sys, optparse, string, operator, gzip
>>> health_day_summary_file = gzip.GzipFile( "health_CORR_summary.csv.gz", "rb")
>>> lot_source_contents = health_day_summary_file.readlines()

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/gzip.py", line 413, in readlines
line = self.readline()
File "/usr/lib/python2.4/gzip.py", line 387, in readline
c = self.read(readsize)
File "/usr/lib/python2.4/gzip.py", line 224, in read
self._read(readsize)
File "/usr/lib/python2.4/gzip.py", line 265, in _read
buf = self.fileobj.read(size)
OverflowError: long int too large to convert to int


Thanks in advance
Aug 27 '07 #1
1 4310
bartonc
6,596 Expert 4TB
Looks likehealth_day_summary_file is not a text file.

file.readlines() is for reading newline terminated text into a list of newline terminated strings.
Aug 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Num | last post by:
Hi all, I have to convert a J2EE date as a long ("Millis") in a .NET date as a long ("Ticks") In Java, currentTimeMillis, is the difference, measured in milliseconds, between the current time...
0
by: Dirk Försterling | last post by:
Hi all, a few days ago, I upgraded from PostgreSQL 7.2.1 to 7.4, following the instructions in the INSTALL file, including dump and restore. All this worked fine without any error (message). ...
16
by: ondekoza | last post by:
Hello, I need to convert the string "FFFFFFFF" to a long. To convert this string I tried the following: >>> 0xffffffff -1 >>> 0xffffffffL 4294967295L OK, this is what I want, so I tried
12
by: Zero | last post by:
Hi everybody, i want to write a small program, which shows me the biggest and smallest number in dependance of the data type. For int the command could be: ...
3
by: nineoo | last post by:
To all, Ok , now this may sound a little crazy, but does any one know if there is a way to increase the maximum value of a unsigned long int? I'm aware of the the max value of an...
7
by: Jo Deni | last post by:
Folks, I'm a newbie here (and with C++). While executing a C++ program I'm getting the following message error: integer constant is too large for "long" type and here is the offending line...
6
by: Warly girl | last post by:
Hi i want your help again in c++ !! i want a function change the "int" to "string" because in my project "Registration system" in task "b" i must write a course class which contains number of...
25
by: tekctrl | last post by:
Anyone: I have a simple MSAccess DB which was created from an old ASCII flatfile. It works fine except for something that just started happening. I'll enter info in a record, save the record,...
32
by: vippstar | last post by:
Assuming all the values of int are in the range of unsigned char, what happends if getc returns EOF? Is it possible that EOF was the value of the byte read? Does that mean that code aiming for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.