Python Forum
int() argument Error.... but it's not :)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
int() argument Error.... but it's not :)
#3
or use try/except TypeError to handle the exception

and by the way, are you sure you need to convert to int. In the JSON response you show in your other thread the numeric values are converted to int/float. They are not strings. Still null will be converted to None so you still need to do some checks, but no need to convert
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
int() argument Error.... but it's not :) - by LeoT - Feb-24-2021, 05:39 PM
RE: int() argument Error.... but it's not :) - by buran - Feb-24-2021, 06:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange argument count error rowan_bradley 3 764 Aug-06-2023, 10:58 AM
Last Post: rowan_bradley
  Error: _vhstack_dispatcher() takes 1 positional argument but 9 were given alexfrol86 3 5,895 May-09-2022, 12:49 PM
Last Post: deanhystad
  SyntaxError: positional argument follows keyword argument syd_jat 3 5,880 Mar-03-2020, 08:34 AM
Last Post: buran
  Syntax Error with Argument Parser aditya_man 1 3,962 Sep-30-2019, 01:21 PM
Last Post: ichabod801
  Invalid argument error thrown. pyseeker 4 8,651 Sep-10-2019, 07:03 PM
Last Post: pyseeker
  Type error: dump() missing 1 required positional argument: fp jaycuff13 2 22,066 Jul-13-2019, 10:21 AM
Last Post: jaycuff13
  missing 1 required positional argument error nikos 3 7,550 Feb-28-2019, 12:53 PM
Last Post: nikos

Forum Jump:

User Panel Messages

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