Skip to content
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

Update shape_logic.py to handle invalid sound #70

Conversation

Mohamed-Waiel-Shikfa
Copy link
Contributor

Tries to address:

I would like to ask what are expected file path format? I tried just referencing a local file by its name and that didn't work for me. This clarification might help coming up with a better solution to the problem.

@austin-schick
Copy link
Collaborator

I would like to ask what are expected file path format?

Now that I look at the code, Sound objects may not even be able to handle file paths at all. You may need to pass a file:// url instead of a standard path.

It would be nice to improve this, so that Sound objects can take a normal file path.

In general, I think this error handling should happen either in the constructor of the Sound object, or in the main function of sound.py. We should be able to tell if the path was invalid (or we failed to read the path, etc) without explicitly trying to play the sound.

@Mohamed-Waiel-Shikfa
Copy link
Contributor Author

I have decided to close this PR in favour of:

Over there a complete redesign of the sound system if cmu_graphics was made and that also solves this issue.

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.

2 participants