This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Overflow error
Type: behavior Stage: resolved
Components: Versions: Python 3.4, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Vignesh, serhiy.storchaka, terry.reedy
Priority: normal Keywords:

Created on 2018-04-09 03:08 by Vignesh, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
New Doc 2018-04-09.pdf Vignesh, 2018-04-09 03:08 I cannot get input of digit value from array even if I derecho declared in Long array using typecode 'L'. It shows error, overflow error, Python int too large to convert c long
Messages (3)
msg315107 - (view) Author: Vignesh (Vignesh) Date: 2018-04-09 03:08
Help me to recover this.......
msg315116 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-04-09 08:34
Please provide your code and the description of your problem as plain text.
msg315139 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-04-09 16:57
Vignesh: This issue tracker is for reporting bugs in the CPython interpreter.  Requests for help with problems with your code should go elsewhere, such as pythonlist mail list or stackoverflow.com web site.

In this case, your problem is described in the error message: you input an int that is too large for the array of C longs.  The following is a much shortened example equivalent to your code.

>>> import array
>>> longs = array.array('l',[])
>>> longs.append(2222222222222222222222222222222222222222222)
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    longs.append(2222222222222222222222222222222222222222222)
OverflowError: Python int too large to convert to C long

When a program gets input from a user, it must be prepared to catch and deal with exceptions.  If you have more questions, ask on a user help forum, such as the 2 I listed above.
History
Date User Action Args
2022-04-11 14:58:59adminsetgithub: 77425
2018-04-09 16:57:51terry.reedysetstatus: open -> closed
messages: + msg315139

assignee: terry.reedy ->
components: - IDLE
resolution: not a bug
stage: resolved
2018-04-09 08:34:06serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg315116
2018-04-09 03:08:17Vigneshcreate