Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
catch input type error
#5
(Aug-10-2019, 07:23 AM)ndc85430 Wrote:
(Aug-10-2019, 06:21 AM)mcmxl22 Wrote: Why dosen't this catch the error?
Because input is throwing an exception

No, it´s the int() function that throws the exeption as the string 'a' cannot be converted into an integer number.
Quote:ValueError: invalid literal for int() with base 10: 'a'
Reply


Messages In This Thread
catch input type error - by mcmxl22 - Aug-10-2019, 06:21 AM
RE: catch input type error - by ThomasL - Aug-10-2019, 06:27 AM
RE: catch input type error - by Lawr3y - Aug-10-2019, 06:51 AM
RE: catch input type error - by ndc85430 - Aug-10-2019, 07:23 AM
RE: catch input type error - by ThomasL - Aug-10-2019, 10:18 AM
RE: catch input type error - by wavic - Aug-11-2019, 07:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Regex to catch what user has put in text box robertkwild 26 5,052 Jun-26-2024, 01:06 PM
Last Post: AdamHensley
  Input error correction. shakoun 4 1,552 Jun-07-2024, 12:59 PM
Last Post: menator01
  Wrong type error rowan_bradley 6 2,742 Aug-07-2023, 10:44 AM
Last Post: rowan_bradley
  Type Error: Unsupported Operand jhancock 2 4,690 Jul-22-2023, 11:33 PM
Last Post: jhancock
  try catch not working? korenron 2 1,544 Jan-15-2023, 01:54 PM
Last Post: korenron
  how to make sure an input is from the wanted type astral_travel 16 4,989 Oct-31-2022, 04:11 PM
Last Post: astral_travel
  Error in Using INPUT statement gunwaba 1 2,867 Jul-03-2022, 10:22 PM
Last Post: deanhystad
  Python Anytree - Is not of type 'NodeMixin' error georgebijum 3 3,215 May-05-2022, 01:43 PM
Last Post: Gribouillis
  Multiprocessing queue catch get timeout Pythocodras 1 4,307 Apr-22-2022, 06:01 PM
Last Post: Pythocodras
Star I'm getting syntax error while using input function in def. yecktmpmbyrv 1 2,722 Oct-06-2021, 09:39 AM
Last Post: menator01

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020