Skip to content

fixed type error that originated from pygame.Surface() #117

Open
LeaStef wants to merge 1 commit intoabr:mainfrom
LeaStef:fix_type_error_pygame
Open

fixed type error that originated from pygame.Surface() #117
LeaStef wants to merge 1 commit intoabr:mainfrom
LeaStef:fix_type_error_pygame

Conversation

@LeaStef
Copy link
Copy Markdown

@LeaStef LeaStef commented Apr 22, 2025

when running "abr_control/examples/PyGame/avoid_obstacles.py" a type error is raised caused by 'pygame.Surface()'. It is fixed by casting the input param to int.

Error:
Traceback (most recent call last):
File "/home/steffen/workspace_common/abr_control/examples/PyGame/avoid_obstacles.py", line 37, in
interface = PyGame(robot_config, arm_sim, on_click=on_click)
File "/home/steffen/workspace_common/abr_control/abr_control/interfaces/pygame.py", line 86, in init
self.lines_base.append(pygame.Surface((L, line_width), pygame.SRCALPHA, 32))
ValueError: size needs to be (number width, number height)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant