Re: Windows and Subclassing - 'OverflowError': int too long to convert

2020-07-29 Thread Eko palypse
Hello Eryk, thank you for your interest in my problem and you've nailed it, the problem was solved by putting all Windows API definitions in a separate module and making sure that I only use WinDLL. I would never have thought of that, because I only used WinDLL in this module. But a PostMessage in

Re: Windows and Subclassing - 'OverflowError': int too long to convert

2020-07-29 Thread Eryk Sun
On 7/28/20, Eko palypse wrote: > > Now when I get this error the message I receive in this situation is always > like this. > > hWnd=197364, msg=20, wParam=*18446744072652653190*, lParam=0 > > Traceback (most recent call last): > File "_ctypes/callbacks.c", line 237, in 'calling callback functio

Windows and Subclassing - 'OverflowError': int too long to convert

2020-07-28 Thread Eko palypse
Hello, I am subclassing a scintilla window and it happens every now and then that I get an OverflowError. I've logged the message and could narrow down that it is a single windows message which causes this trouble. It's WM_ERASEBKGND. Now the confusing part for me is the following. Ac

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Larry Martell
On Mon, Dec 4, 2017 at 7:36 PM, Thomas Jollans wrote: > On 05/12/17 01:21, Larry Martell wrote: >> On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: >>> On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell >>> wrote: >>>> Trying to zip a large file is

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:21, Larry Martell wrote: > On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: >> On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell >> wrote: >>> Trying to zip a large file is failing with OverflowError: 'size does >>> not fit in an int&

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Thomas Jollans
On 05/12/17 01:15, Chris Angelico wrote: > On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell > wrote: >> Trying to zip a large file is failing with OverflowError: 'size does >> not fit in an int'. Googling I found this: >> >> https://bugs.python.or

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Larry Martell
On Mon, Dec 4, 2017 at 7:15 PM, Chris Angelico wrote: > On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell > wrote: >> Trying to zip a large file is failing with OverflowError: 'size does >> not fit in an int'. Googling I found this: >> >> https://b

Re: zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Chris Angelico
On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell wrote: > Trying to zip a large file is failing with OverflowError: 'size does > not fit in an int'. Googling I found this: > > https://bugs.python.org/issue23306 > > and this: > > https://hg.python.org/cpython/rev/21

zlib OverflowError: 'size does not fit in an int'

2017-12-04 Thread Larry Martell
Trying to zip a large file is failing with OverflowError: 'size does not fit in an int'. Googling I found this: https://bugs.python.org/issue23306 and this: https://hg.python.org/cpython/rev/2192edcfea02 which seems to make me think this was fixed this was fixed on Jul 23 2016. I

matplotlib question: OverflowError: Allocated too many blocks

2013-09-20 Thread Ray
len(x) ) matplotlib give exception: OverflowError: Allocated too many blocks if I display it by: plt.draw() plt.show() everything works fine. it seems I just can't save the output to a file. I know if I reduce the figsize would make it work. [aka plt.subplots(figsize=(5,2)) ] but this

Re: math.erfc OverflowError

2010-06-14 Thread geremy condra
On Sun, Jun 13, 2010 at 10:36 PM, Ben Finney wrote: > geremy condra writes: > >> You know, I've never been a part of a community in which the URL >> format was the most contentious part of filing a bug report. > > Heck no, the bug report is already filed, and contentions about the bug > report sh

Re: math.erfc OverflowError

2010-06-13 Thread D'Arcy J.M. Cain
On 13 Jun 2010 18:23:28 -0700 a...@pythoncraft.com (Aahz) wrote: > What's your cite that URLs never end with a period? AFAIK, that's > perfectly valid by the rules. Technically that may be true but when do you ever see one? If your email client discards trailing periods I think you can expect i

Re: math.erfc OverflowError

2010-06-13 Thread Ben Finney
geremy condra writes: > You know, I've never been a part of a community in which the URL > format was the most contentious part of filing a bug report. Heck no, the bug report is already filed, and contentions about the bug report should presumably be going into that report. This issue isn't abo

Re: math.erfc OverflowError

2010-06-13 Thread Steven D'Aprano
On Sun, 13 Jun 2010 19:05:28 -0700, geremy condra wrote: > On Sun, Jun 13, 2010 at 6:44 PM, Ben Finney > wrote: >> a...@pythoncraft.com (Aahz) writes: >> >>> In article , >>> geremy condra   wrote: >>> > >>> >Bug filed, http://bugs.python.org/issue8986. [...] > You know, I've never been a part

Re: math.erfc OverflowError

2010-06-13 Thread geremy condra
On Sun, Jun 13, 2010 at 6:44 PM, Ben Finney wrote: > a...@pythoncraft.com (Aahz) writes: > >> In article , >> geremy condra   wrote: >> > >> >Bug filed, http://bugs.python.org/issue8986. >> >> Please don't put extraneous punctuation on URLs. > > The punctuation isn't extraneous; it's a necessary p

Re: math.erfc OverflowError

2010-06-13 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: > In article , > geremy condra wrote: > > > >Bug filed, http://bugs.python.org/issue8986. > > Please don't put extraneous punctuation on URLs. The punctuation isn't extraneous; it's a necessary part of a natural English sentence. That's where it belongs. Bet

Re: math.erfc OverflowError

2010-06-13 Thread Aahz
In article , D'Arcy J.M. Cain wrote: >On 13 Jun 2010 09:49:03 -0700 >a...@pythoncraft.com (Aahz) wrote: >> >> Please don't put extraneous punctuation on URLs. That period is a valid >> URL character, but it's invalid for this URL, and it's not obvious to the >> reader whether the period should b

Re: math.erfc OverflowError

2010-06-13 Thread D'Arcy J.M. Cain
On 13 Jun 2010 09:49:03 -0700 a...@pythoncraft.com (Aahz) wrote: > >Bug filed, http://bugs.python.org/issue8986. > > Please don't put extraneous punctuation on URLs. That period is a valid > URL character, but it's invalid for this URL, and it's not obvious to the > reader whether the period shou

Re: math.erfc OverflowError

2010-06-13 Thread Mark Dickinson
On Jun 13, 12:56 am, geremy condra wrote: > On Sat, Jun 12, 2010 at 4:40 PM, Robert Kern wrote: > > On 2010-06-12 17:49 , geremy condra wrote: > > >> In Python3.2, calling math.erfc with a value in [-27.2, -30) raises > >> an OverflowError: math range error.

Re: math.erfc OverflowError

2010-06-13 Thread Aahz
In article , geremy condra wrote: > >Bug filed, http://bugs.python.org/issue8986. Please don't put extraneous punctuation on URLs. That period is a valid URL character, but it's invalid for this URL, and it's not obvious to the reader whether the period should be part of the URL. URLs in gener

Re: math.erfc OverflowError

2010-06-12 Thread geremy condra
On Sat, Jun 12, 2010 at 11:05 PM, Steven D'Aprano wrote: > On Sat, 12 Jun 2010 15:49:37 -0700, geremy condra wrote: > >> In Python3.2, calling math.erfc with a value in [-27.2, -30) raises an >> OverflowError: math range error. This is inconsistent with the erfc

Re: math.erfc OverflowError

2010-06-12 Thread Steven D'Aprano
On Sat, 12 Jun 2010 15:49:37 -0700, geremy condra wrote: > In Python3.2, calling math.erfc with a value in [-27.2, -30) raises an > OverflowError: math range error. This is inconsistent with the erfc > function from scipy (scipy.special.erfc) as well as with the C99 > function by t

Re: math.erfc OverflowError

2010-06-12 Thread geremy condra
On Sat, Jun 12, 2010 at 4:40 PM, Robert Kern wrote: > On 2010-06-12 17:49 , geremy condra wrote: >> >> In Python3.2, calling math.erfc with a value in [-27.2, -30) raises >> an OverflowError: math range error. This is inconsistent with the >> erfc function from scipy (

Re: math.erfc OverflowError

2010-06-12 Thread Robert Kern
On 2010-06-12 17:49 , geremy condra wrote: In Python3.2, calling math.erfc with a value in [-27.2, -30) raises an OverflowError: math range error. This is inconsistent with the erfc function from scipy (scipy.special.erfc) as well as with the C99 function by the same name, both of which return 2

math.erfc OverflowError

2010-06-12 Thread geremy condra
In Python3.2, calling math.erfc with a value in [-27.2, -30) raises an OverflowError: math range error. This is inconsistent with the erfc function from scipy (scipy.special.erfc) as well as with the C99 function by the same name, both of which return 2. I suspect that this is the result of the

Re: OverflowError in RLock.acquire()

2009-07-24 Thread David Roberts
>> 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 >>    return _active[_get_ident()] >> OverflowError: can't convert negative valu

Re: OverflowError in RLock.acquire()

2009-07-24 Thread Gabriel Genellina
03, in currentThread return _active[_get_ident()] OverflowError: can't convert negative value to unsigned long Looks like a bug in the thread module - you should report it at http://bugs.python.org -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: OverflowError in RLock.acquire()

2009-07-23 Thread David Roberts
rrent_thread() >  File "C:\Python26\lib\threading.py", line 803, in currentThread >    return _active[_get_ident()] > OverflowError: can't convert negative value to unsigned long > > Where __lock is an RLock object. > > The error only occurs for a single class (whi

OverflowError in RLock.acquire()

2009-07-23 Thread David Roberts
ck: File "C:\Python26\lib\threading.py", line 115, in acquire me = current_thread() File "C:\Python26\lib\threading.py", line 803, in currentThread return _active[_get_ident()] OverflowError: can't convert negative value to unsigned long Where __lock is an RLock ob

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. O

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 i

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

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 pac

OverflowError while sending large file via socket

2009-04-12 Thread Ryniek90
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 exchanged data is often bigger than 4GB. So why i&#x

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Steven D'Aprano
On Thu, 23 Oct 2008 13:40:22 +, Marc 'BlackJack' Rintsch wrote: > This can be written more straigth forward as ``100**155`` or ``pow(100, > 155)``. No need for `eval()`\ing a string. But how else can the OP get an order of magnitude slow-down on an operation that is slow in the first place?

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Marc 'BlackJack' Rintsch
On Thu, 23 Oct 2008 02:21:36 -0700, Tzury Bar Yochay wrote: eval(('100*'* 155)[:-1]) > 100 > 000 > 000 >

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread John Machin
On Oct 23, 9:24 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > > Because math.pow returns a float; 100 ** 155 won't fit in a float. > > Sure that is the reason. > May I rephrase, my question: > Why not returning another type as long as we can calculate it? > After all, math module is likely to b

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Christian Heimes
Tzury Bar Yochay wrote: Because math.pow returns a float; 100 ** 155 won't fit in a float. Sure that is the reason. May I rephrase, my question: Why not returning another type as long as we can calculate it? After all, math module is likely to be used on large numbers as well. Because it's ve

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Tzury Bar Yochay
> Because math.pow returns a float; 100 ** 155 won't fit in a float. Sure that is the reason. May I rephrase, my question: Why not returning another type as long as we can calculate it? After all, math module is likely to be used on large numbers as well. -- http://mail.python.org/mailman/listinfo

Re: why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread John Machin
On Oct 23, 8:21 pm, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > What is the reason math.pow yields OverflowError while python itself > can > calculate these large numbers. e.g: > > >>> import math > >>> math.pow(100, 154) > 1e+308 > >>>

why does math.pow yields OverflowError (while python itself can calculate that large number)

2008-10-23 Thread Tzury Bar Yochay
What is the reason math.pow yields OverflowError while python itself can calculate these large numbers. e.g: >>> import math >>> math.pow(100, 154) 1e+308 >>> math.pow(100, 155) Traceback (most recent call last): File "", line 1, in OverflowError: math r

Re: A fix for OverflowError in 64bits platforms

2008-07-04 Thread Manuel Vazquez Acosta
ython 2.4.5, Plone 2.5.5, Zope 2.9.8final >> OverflowError: signed integer is greater than maximum >> >> In the archives I encounter no solutions. > > Archives: Python? Zope? Plone? The three of them ;) > >> This is what I could find, so I share with you all: > &g

Re: A fix for OverflowError in 64bits platforms

2008-07-03 Thread Terry Reedy
Manuel Vazquez Acosta wrote: Hi all, I'm debugging a Plone site in an AMD64 laptop. When I first tried to run Zope, I got this exception: In general, versions numbers for both Python and the app are helpful. OverflowError: signed integer is greater than maximum In the archives I enco

A fix for OverflowError in 64bits platforms

2008-07-03 Thread Manuel Vazquez Acosta
Hi all, I'm debugging a Plone site in an AMD64 laptop. When I first tried to run Zope, I got this exception: OverflowError: signed integer is greater than maximum In the archives I encounter no solutions. This is what I could find, so I share with you all: It seems that on 64bit plat

OverflowError: regular expression code size limit exceeded

2008-04-15 Thread gdetre
ns/2.5/lib/ python2.5/sre_compile.py", line 530, in compile groupindex, indexgroup OverflowError: regular expression code size limit exceeded I have successfully run this regular expression many times under linux. I tried it first with the default python iinstallation on Leopard, 2.5.1,

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
n that the OP was calling (mktime): """If the input value cannot be represented as a valid time, either OverflowError or ValueError will be raised (which depends on whether the invalid value is caught by Python or the underlying C libraries). The earliest date for which it can generate a time is platform- dependent.""" Cheers, John -- http://mail.python.org/mailman/listinfo/python-list

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 &q

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

2007-04-15 Thread Jorgen Bodde
d now that I come to > > think of it, songs from J.S. Bach are excluded from entering as well) > > .. > > > > This is what I try: > > > >>>> time.mktime((1928, 12,28, 0, 0, 0, 0, 0, 0)) > > Traceback (most recent call last): > > File "

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

2007-04-15 Thread Diez B. Roggisch
rt at least 1900 as date (and now that I come to > think of it, songs from J.S. Bach are excluded from entering as well) > .. > > This is what I try: > >>>> time.mktime((1928, 12,28, 0, 0, 0, 0, 0, 0)) > Traceback (most recent call last): > File "", li

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

OverflowError: mktime argument out of range ???

2007-04-15 Thread Jorgen Bodde
excluded from entering as well) .. 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 The only solution I can think of is making a custom time class that

Re: OverflowError: math range error...

2006-06-23 Thread Sheldon
rray[0,0:4] = > > int(multiply(divide(statistic_array[0,0:4],statistic_array \ > > [0,4]),1.0))/100.0 > > > > Does anyone know why Python is complaining: > > > > "statistic_array[0,0:4] = > > int(multiply(divide(statistic_array[0,0:4],statistic_array

Re: OverflowError: math range error...

2006-06-23 Thread Sheldon
4] = > > int(multiply(divide(statistic_array[0,0:4],statistic_array[0,4]),1.0))/100.0 > > > > OverflowError: math range error" > > > > and how do I get around this problem? This stupid because there is a if > > statement preventing this "dividing by zero". >

Re: OverflowError: math range error...

2006-06-22 Thread Robert Kern
ic_array \ > [0,4]),1.0))/100.0 > > Does anyone know why Python is complaining: > > "statistic_array[0,0:4] = > int(multiply(divide(statistic_array[0,0:4],statistic_array[0,4]),1.0))/100.0 > > OverflowError: math range error" > > and how do I get

Re: OverflowError: math range error...

2006-06-22 Thread Simon Forman
\ > [0,4]),1.0))/100.0 > > Does anyone know why Python is complaining: > > "statistic_array[0,0:4] = > int(multiply(divide(statistic_array[0,0:4],statistic_array[0,4]),1.0))/100.0 > > OverflowError: math range error" > > and how do I get around thi

OverflowError: math range error...

2006-06-22 Thread Sheldon
hon is complaining: "statistic_array[0,0:4] = int(multiply(divide(statistic_array[0,0:4],statistic_array[0,4]),1.0))/100.0 OverflowError: math range error" and how do I get around this problem? This stupid because there is a if statement preventing this "dividing by zero&quo

Re: array problems.. OverflowError

2005-06-08 Thread Chris Lambacher
ination MAC address > destAddress = > for i in range(0, len(destAddress), 2): > pData[i/2] = int(destAddress[i:i+2], 16) > > pattern = 0x > for i in range( 512): > pData[i+6] = long(pattern, 16) > print pData > >

array problems.. OverflowError

2005-06-08 Thread [EMAIL PROTECTED]
2] = int(destAddress[i:i+2], 16) pattern = 0x for i in range( 512): pData[i+6] = long(pattern, 16) print pData OverflowError: long int too large to covert to int def test(pData.buffer_info()[0]) Any help appreciated. -Ashton -- http://mail.python.org/mailman/listinfo/python-list

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&

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 "&qu

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 >

overflowerror!!

2005-05-26 Thread [EMAIL PROTECTED]
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 How do i fill in the val 256 times