Re: OverflowError in RLock.acquire()

2009-07-24 Thread David Roberts
Done: http://bugs.python.org/issue6562 -- David Roberts http://da.vidr.cc/ On Fri, Jul 24, 2009 at 20:24, Gabriel Genellina wrote: > En Fri, 24 Jul 2009 01:27:10 -0300, David Roberts escribió: > >> I'm trying to port a Python application to Windows, and I'm getting >> the following error (whic

Re: OverflowError in RLock.acquire()

2009-07-24 Thread Gabriel Genellina
En Fri, 24 Jul 2009 01:27:10 -0300, David Roberts escribió: I'm trying to port a Python application to Windows, and I'm getting the following error (which did not occur when running on Linux): Exception in thread Thread-4: File "C:\Python26\lib\threading.py", line 803, in currentThread r

Re: OverflowError in RLock.acquire()

2009-07-23 Thread David Roberts
I forgot to mention, Python version is 2.6.2. -- David Roberts http://da.vidr.cc/ On Fri, Jul 24, 2009 at 14:27, David Roberts wrote: > Hi, > > I'm trying to port a Python application to Windows, and I'm getting > the following error (which did not occur when running on Linux): > > Exception in

Re: OverflowError while sending large file via socket

2009-04-12 Thread Gabriel Genellina
En Sun, 12 Apr 2009 19:28:43 -0300, > escribió: Ryniek90 writes: When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can hold" You're not supposed to put the 4GB all in one string. Open the socket and sen

Re: OverflowError while sending large file via socket

2009-04-12 Thread Benjamin Peterson
Steven D'Aprano REMOVE-THIS-cybersource.com.au> writes: > > which suggests to me that it will be implementation dependent The length of sequences is constrained by sys.maxsize (and no, you can't change it). -- http://mail.python.org/mailman/listinfo/python-list

Re: OverflowError while sending large file via socket

2009-04-12 Thread Jean-Paul Calderone
On 13 Apr 2009 01:45:56 GMT, Steven D'Aprano wrote: On Mon, 13 Apr 2009 00:21:34 +0200, Ryniek90 wrote: When i wanted to send an .iso file of 4GB length, i had traceback: "OverflowError: requested number of bytes is more than a Python string can hold" Sockets are being used in every network

Re: OverflowError while sending large file via socket

2009-04-12 Thread Steven D'Aprano
On Mon, 13 Apr 2009 00:21:34 +0200, Ryniek90 wrote: > When i wanted to send an .iso file of 4GB length, i had traceback: > "OverflowError: requested number of bytes is more than a Python string > can hold" > > Sockets are being used in every network app, i.e: p2p progs (like > BitTorrent), and ex

Re: OverflowError while sending large file via socket

2009-04-12 Thread Paul Rubin
Ryniek90 writes: > When i wanted to send an .iso file of 4GB length, i had traceback: > "OverflowError: requested number of bytes is more than a Python string > can hold" You're not supposed to put the 4GB all in one string. Open the socket and send smaller packets through it. -- http://mail.pyt

Re: OverflowError: mktime argument out of range ???

2007-04-17 Thread John Machin
On Apr 17, 7:39 pm, "Jorgen Bodde" <[EMAIL PROTECTED]> wrote: > Thanks again, > > I will explain what happened. I am a python newbie. Even GvR was a Python newbie once :-) > The time and > datetime modules are confusing at the beginning, but after diving into > them I started to understand the st

Re: OverflowError: mktime argument out of range ???

2007-04-17 Thread Jorgen Bodde
Thanks again, I will explain what happened. I am a python newbie. The time and datetime modules are confusing at the beginning, but after diving into them I started to understand the structure. So what I did was using the time module for date storage, but I came to understand that time is actually

Re: OverflowError: mktime argument out of range ???

2007-04-16 Thread John Machin
On Apr 17, 1:02 am, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > John Machin wrote: > > > Maybe it does. It sure would be nice to get a definite answer. Pity > > nobody documented the time module. > > "The epoch is the point where the time starts. On January 1st of that > year, at 0 hours, the ``time

Re: OverflowError: mktime argument out of range ???

2007-04-16 Thread Paul Boddie
John Machin wrote: > > Maybe it does. It sure would be nice to get a definite answer. Pity > nobody documented the time module. "The epoch is the point where the time starts. On January 1st of that year, at 0 hours, the ``time since the epoch'' is zero. For Unix, the epoch is 1970. To find out wha

Re: OverflowError: mktime argument out of range ???

2007-04-15 Thread John Machin
On Apr 15, 8:48 pm, Michael Bentley <[EMAIL PROTECTED]> wrote: > On Apr 15, 2007, at 5:41 AM, Jorgen Bodde wrote: > > > This is what I try: > > time.mktime((1928, 12,28, 0, 0, 0, 0, 0, 0)) > > Traceback (most recent call last): > > File "", line 1, in > > OverflowError: mktime argument out

Re: OverflowError: mktime argument out of range ???

2007-04-15 Thread Jorgen Bodde
Ok thanks, I missed out on datetime where the methods I need are also present. I'll be refactoring my data a bit, thanks again! - Jorgen On 4/15/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > Jorgen Bodde schrieb: > > Hi List > > > > I am working on an app to store guitar songs I am practicin

Re: OverflowError: mktime argument out of range ???

2007-04-15 Thread Diez B. Roggisch
Jorgen Bodde schrieb: > Hi List > > I am working on an app to store guitar songs I am practicing, and for > the fun of it I want to store the date of songs when they were > originally made. So far so good.. > > However, my taste of music is "Rag Time Blues" and that os OLD, very > OLD music. So

Re: OverflowError: mktime argument out of range ???

2007-04-15 Thread Michael Bentley
On Apr 15, 2007, at 5:41 AM, Jorgen Bodde wrote: > This is what I try: > time.mktime((1928, 12,28, 0, 0, 0, 0, 0, 0)) > Traceback (most recent call last): > File "", line 1, in > OverflowError: mktime argument out of range Probably depends on your system. It doesn't break for me: >>>

Re: OverflowError: math range error...

2006-06-23 Thread Sheldon
Thanks for the tips! I am going to look into this some more. I am not used to using Numeric and the logical functions. I didn't think about what you pointed out and somewhere the returned values from these logical methods are not what I expect. I will rewrite the whole thing using alltrue instead.

Re: OverflowError: math range error...

2006-06-23 Thread Sheldon
Thanks for the tips! I am going to look into this some more. /Sheldon Simon Forman skrev: > Sheldon wrote: > > Hi, > > > > I have a written a script that will check to see if the divisor is zero > > before executing but python will not allow this: > > > > if statistic_array[0:4] > 0.0: > > stat

Re: OverflowError: math range error...

2006-06-22 Thread Robert Kern
Sheldon wrote: > Hi, > > I have a written a script that will check to see if the divisor is zero > before executing but python will not allow this: > > if statistic_array[0:4] > 0.0: > statistic_array[0,0:4] = > int(multiply(divide(statistic_array[0,0:4],statistic_array \ > [0,4]),1.0))/100.

Re: OverflowError: math range error...

2006-06-22 Thread Simon Forman
Sheldon wrote: > Hi, > > I have a written a script that will check to see if the divisor is zero > before executing but python will not allow this: > > if statistic_array[0:4] > 0.0: > statistic_array[0,0:4] = > int(multiply(divide(statistic_array[0,0:4],statistic_array \ > [0,4]),1.0))/100.0

Re: overflowerror!!

2005-05-26 Thread John Machin
Will McGugan wrote: > [EMAIL PROTECTED] wrote: > >> I tried that. Still get an Overflowerror: unsigned long is less than >> minimum. >> > > You'll also need to reserve enough space for the 256 ints. Try this.. > > data = array('L', '\0' * 256*4) > > I don't understand. Why not just do the who

Re: overflowerror!!

2005-05-26 Thread Will McGugan
[EMAIL PROTECTED] wrote: > I tried that. Still get an Overflowerror: unsigned long is less than > minimum. > You'll also need to reserve enough space for the 256 ints. Try this.. data = array('L', '\0' * 256*4) Will -- http://www.willmcgugan.com "".join( [ {'*':'@','^':'.'}.get(c,None) or chr

Re: overflowerror!!

2005-05-26 Thread [EMAIL PROTECTED]
I tried that. Still get an Overflowerror: unsigned long is less than minimum. -Ashton -- http://mail.python.org/mailman/listinfo/python-list

Re: overflowerror!!

2005-05-26 Thread Will McGugan
[EMAIL PROTECTED] wrote: > Hello, > I am trying to fill in a dword value into an array and i get an > overflowerror > > Here's what iam trying to do. > > from array import * > data = array('B', '\0' * 256) > > val = 0x > > for i in range(256): > data[i] = val > > print data > > Ho