Python Forum
TypeError: float() argument must be a string or a number, not 'list'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: float() argument must be a string or a number, not 'list'
#3
To debug I would set a breakpoint and look at the arguments. If you don't have debugging you can use print.
print(x_L, x_j)
                newCoeff = float(x_L)/(x_L - x_j) 
One of these will be a list. Knowing which will direct where you put the next print statement.
Reply


Messages In This Thread
RE: TypeError: float() argument must be a string or a number, not 'list' - by deanhystad - Jul-01-2022, 01:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  TypeError: Diagram.render() takes 1 positional argument but 2 were given sachin1361 0 264 Apr-23-2024, 06:39 AM
Last Post: sachin1361
  python calculate float plus float is incorrect? sirocawa 6 457 Apr-16-2024, 01:45 PM
Last Post: DeaD_EyE
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,370 Jun-09-2023, 06:56 PM
Last Post: kpatil
Question Extracting Version Number from a String britesc 2 1,168 May-31-2023, 10:20 AM
Last Post: britesc
  Formatting float number output barryjo 2 968 May-04-2023, 02:04 PM
Last Post: barryjo
  Delete strings from a list to create a new only number list Dvdscot 8 1,653 May-01-2023, 09:06 PM
Last Post: deanhystad
  find random numbers that are = to the first 2 number of a list. Frankduc 23 3,392 Apr-05-2023, 07:36 PM
Last Post: Frankduc
  convert string to float in list jacklee26 6 2,013 Feb-13-2023, 01:14 AM
Last Post: jacklee26
  "TypeError: string indices must be integers, not 'str'" while not using any indices bul1t 2 2,123 Feb-11-2023, 07:03 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable #1 isdito2001 1 1,129 Jan-21-2023, 12:43 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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