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 code to not load gi for .wav files in Linux #213

Closed
pybokeh opened this Issue May 18, 2018 · 5 comments

Comments

3 participants
@pybokeh

pybokeh commented May 18, 2018

Bug Report

File "/home/pybokeh/envs/gamedev/lib/python3.6/site-packages/arcade/sound.py", line 133, in _playsound_unix
import gi

ModuleNotFoundError: No module named gi

Actual behavior:

Crashed and then I get ModuleNotFoundError: No module named gi

Expected behavior:

Play a .wav sound without crashing

Steps to reproduce/example code:

python -m arcade.examples.asteroid_smasher

@pybokeh pybokeh changed the title from ubuntu 16.04 / Python 3.6 ModuleNotFoundError: No module named gi (version 1.3.3) to Ubuntu 16.04: ModuleNotFoundError: No module named gi (version 1.3.3) May 18, 2018

@jgrantdev

This comment has been minimized.

Contributor

jgrantdev commented May 18, 2018

I get the same error that you do. Installing the below system packages and the python package got it working for me.

sudo apt-get install libcairo2-dev libgirepository1.0-dev
pip install pygobject

When you pip install pygobject it may fail, there could be more system packages required that I already had on my system.

Let me know if this works for you so I can update the documentation. Also it appears to freeze the game when the sound is being played, I am unsure if this is the behavior on other platforms as well.

@pvcraven

This comment has been minimized.

Owner

pvcraven commented May 18, 2018

Gstreamer doesn't work with venv. But it isn't needed for .wav files. I'll update the code so it try loading it for .wav.

@pvcraven pvcraven changed the title from Ubuntu 16.04: ModuleNotFoundError: No module named gi (version 1.3.3) to Update code to not load gi for .wav files in Linux May 18, 2018

@pvcraven pvcraven self-assigned this May 18, 2018

@pvcraven pvcraven added this to In progress in Release 1.3.4 May 18, 2018

@pybokeh

This comment has been minimized.

pybokeh commented May 18, 2018

@jgrantdev I installed those things, the asteroid smasher example works and plays sound, but when it plays the sound it lags or freezes for a second or so.

@pvcraven

This comment has been minimized.

Owner

pvcraven commented May 20, 2018

Ok, I'll look into that too.

@pvcraven

This comment has been minimized.

Owner

pvcraven commented May 28, 2018

Closed with release of 1.3.4 on 28-May-2018.

@pvcraven pvcraven closed this May 28, 2018

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