Skip to content

Index error when using Python 3.11 #1

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
nednoodlehead opened this issue Dec 1, 2022 · 0 comments
Open

Index error when using Python 3.11 #1

nednoodlehead opened this issue Dec 1, 2022 · 0 comments

Comments

@nednoodlehead
Copy link

nednoodlehead commented Dec 1, 2022

When plugging in my own link to music

(replacing:

with testfiles() as files:
file = files[0]

With
file = "path/to/my/music"
It raises an error:
File "F:\Projects\Python Projects\punge\audio_player.py", line 50, in callback data = f.read(nblk)["buffer"] ~~~~~~~~~~~~^^^^^^^^^^ IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices Traceback (most recent call last): File "F:\Projects\Python Projects\punge\audio_player.py", line 79, in <module> mine.play(mus) File "F:\Projects\Python Projects\punge\audio_player.py", line 63, in play self.exited.wait(0.1) File "C:\Users\Spencer\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 622, in wait signaled = self._cond.wait(timeout) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Spencer\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 324, in wait gotit = waiter.acquire(True, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError

I tried this exact code in a Python 3.10 environment, and it worked as expected. Moved over to a python 3.11, and error.

I would appreciate help 'cause I would like to write my project in 3.11 :)

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

No branches or pull requests

1 participant