#πŸ”’ segmentation fault

62 messages Β· Page 1 of 1 (latest)

spiral bronze
#

my error is
zsh: segmentation fault python3 main.py

turbid scrollBOT
#

@spiral bronze

Python help channel opened

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.

spiral bronze
#

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

normal sierra
#

That's probably the fault of one of the libraries you're using. I suspect simpleaudio.

vernal cobalt
#

!pip simpleaudio

turbid scrollBOT
#

Simple, asynchronous audio playback for Python 3.

Released on <t:1574999788:D>.

vernal cobalt
#

oof 2019

normal sierra
spiral bronze
#

it doesnt install

vernal cobalt
#

I'm unfamiliar with both.

spiral bronze
normal sierra
#

the comments mention how one can modify the source to build a working version. since the package is abandoned, well.

normal sierra
#

you should just use another library like playsound

spiral bronze
vernal cobalt
#

What error do you get installing it?

#

*trying to install

spiral bronze
normal sierra
#

playsound is also kind of abandoned but installs fine on 3.12 for me.

spiral bronze
#

theres my error

vernal cobalt
#

Abandoned modules bum me out.

spiral bronze
normal sierra
#

try updating pip, wheel and setuptools first, perhaps

vernal cobalt
#

@spiral bronze Do you want to play audio files in general or just a specific format?

spiral bronze
#

Error: No available formula with the name "pip". Did you mean pipx, pig, pit, pop, pup, php, pcp, zip, sip or vip?

normal sierra
#

depends on how you installed python, I guess, but I was thinking of just python -m pip install --upgrade pip setuptools wheel

spiral bronze
#

oh alr

normal sierra
#

of the non-abandoned ones there's pyaudio

normal sierra
spiral bronze
#

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

spiral bronze
#

ok i fixed it

#

now it does this really weird thing

#

where the audio plays

#

then the gui shows up

normal sierra
#

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.

normal sierra
#

it's an argument to playsound

spiral bronze
normal sierra
#

I mean that it's an argument to playsound.playsound, the only function in the playsound package.

turbid scrollBOT
#
Python help channel closed

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.