Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Python Error required argument is not a float

#1
   
 I have another bug In
        pi = pose_ref
        pi.setPos(data[i])     
data which are inside they have csv format and the path input is this one
      path_file = r'C:/Users/giahn/OneDrive/Έγγραφα/Σχολή/ΔΙΠΛΩΜΑ/main/Test/program.csv'
      data = LoadList(path_file)
      program_name = getFileName(path_file)

I will send you the code If you want to see more details


Attached Files
.py   elam1.py (Size: 3.58 KB / Downloads: 161)
#2
The data you are providing using setPos should be just a list of [X,Y,Z] values as numbers, not strings. The error is raised because you have some rows with strings or characters.

This example will help you better troubleshoot the values you are providing:
Code:
x = data[i][0]
y = data[i][1]
z = data[i][2]
xyz_values = [x,y,z]
print(xyz_values)       
pi.setPos(xyz_values)
  




Users browsing this thread:
1 Guest(s)