ArdenButterfield / stammer

Recreate any audio track by rearranging the frames of another video
MIT License
434 stars 29 forks source link

'type' object is not subscriptable #58

Closed Mrcolosio closed 1 year ago

Mrcolosio commented 1 year ago

C:\Users[USER]>python C:\Users[USER]\Downloads\stammer-main\stammer.py Descargas\steamed-hams.mp4 C:\Users[USER]\Downloads\street-fighter-iii-3rd-strike-lets-get-it-on.mp4 C:\Users[USER]\Downloads\stammer-main\outputs\thirdstrike.mp4 Traceback (most recent call last): File "C:\Users[USER]\Downloads\stammer-main\stammer.py", line 20, in import video_out File "C:\Users[USER]\Downloads\stammer-main\video_out.py", line 2, in from decay_cache import DecayCache File "C:\Users[USER]\Downloads\stammer-main\decay_cache.py", line 13, in class DecayCache: File "C:\Users[USER]\Downloads\stammer-main\decay_cache.py", line 14, in DecayCache array: dict[Frame] = {} TypeError: 'type' object is not subscriptable

I don't know what I'm doing wrong sorry this is the first python code that I run I Installed all the things the readme tells me

ArdenButterfield commented 1 year ago

Thanks for trying out our project, and I'm sorry that this was your first experience with python code!

Which version of python are you running? That is, what do you get when you run python3 --version? I'm wondering if the issue might be that you're using an earlier version of Python than what we've been testing on.

@Firepal do you have any ideas?

Mrcolosio commented 1 year ago

when I run the command it gives me:

Python 3.10.10

Firepal commented 1 year ago

Oh gosh, I get it. Thank you for reporting this bug!

array: dict[Frame] = {}
TypeError: 'type' object is not subscriptable

The error here is the variable name. array is actually a built-in type in the very latest versions of Python.