Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LeaStef
Copy link

@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