#π segmentation fault
62 messages Β· Page 1 of 1 (latest)
@spiral bronze
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
this is my code
i even asked ai whats the problem
something to do with memory
im only in secondary school so i dont understand what memory thingy is about
also im using a venv since im on macos
i forgot to mention
when you press start engine
then when the audio ends and you use the slider
the thing crashes
That's probably the fault of one of the libraries you're using. I suspect simpleaudio.
!pip simpleaudio
oof 2019
It seems to be a known issue on 3.12: https://github.com/hamiltron/py-simple-audio/issues/72
I'm unfamiliar with both.
i dont understand the solution π
the comments mention how one can modify the source to build a working version. since the package is abandoned, well.
oh
you should just use another library like playsound
playsound doesnt install
hold on lemme put it in pastebin
playsound is also kind of abandoned but installs fine on 3.12 for me.
Abandoned modules bum me out.
i cant find a decent one that can play audio files
try updating pip, wheel and setuptools first, perhaps
alr
@spiral bronze Do you want to play audio files in general or just a specific format?
in general
do you mean using brew
Error: No available formula with the name "pip". Did you mean pipx, pig, pit, pop, pup, php, pcp, zip, sip or vip?
depends on how you installed python, I guess, but I was thinking of just python -m pip install --upgrade pip setuptools wheel
oh alr
ok playsound is installed now
of the non-abandoned ones there's pyaudio
ah, great, then just use that
let me convert the code
first let me see if it works
what??
FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python
oh wait
ok nvm the error is still there
did u see my error
ok i fixed it
now it does this really weird thing
where the audio plays
then the gui shows up
are you sure you're using block=False?
Thereβs an optional second argument, block, which is set to True by default. Setting it to False makes the function run asynchronously.
where do i change it?
it's an argument to playsound
is it in a json file, ive never changed an arguement in a package
I mean that it's an argument to playsound.playsound, the only function in the playsound package.
so what do i do
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.