You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been following the instructions but I cannot get the robot connected. When I use the same IP in my browser it works fine, I can access Misty Studio.
Traceback (most recent call last):
File "/home/jhielson/ros_ws/src/misty_wrapper/src/example.py", line 5, in <module>
misty = Robot("192.168.1.108") # This is the IP of my misty. Replace with your IP
File "/home/jhielson/anaconda3/envs/mistyWrapper/lib/python3.9/site-packages/mistyPy/__init__.py", line 27, in __init__
self.populateImages()
File "/home/jhielson/anaconda3/envs/mistyWrapper/lib/python3.9/site-packages/mistyPy/__init__.py", line 93, in populateImages
for out in reply["result"]:
TypeError: string indices must be integers
Activity
Kakcalu13 commentedon May 14, 2024
ohhh lol i LITERALLY just fixed this.
prob too late but im sharing for everyone in future
the solution:
def populateImages(self):
self.images_saved = []
resp = requests.get('http://' + self.ip + '/api/images/list')
new_data = resp.json()
for get_name in new_data['result']:
self.images_saved.append(get_name['name'])
the code was probably extremely outdated. I updated the code to latest