five-video-classification-methods icon indicating copy to clipboard operation
five-video-classification-methods copied to clipboard

list index out of range error on Windows 10, Python

Open Sharma-Prachi opened this issue 6 years ago • 2 comments

Hi! I am not able to go through this error. Traceback (most recent call last): File "1_move_files.py", line 81, in main() File "1_move_files.py", line 78, in main move_files(group_lists) File "1_move_files.py", line 49, in move_files filename = parts[1] IndexError: list index out of range

I have tried every suggestion to solve it in other similar issues. I tried parts = video.split('\'). but didn't change a thing. I have all the files in the same directory I am working in. I tried installing ffmpeg but it also didn't help.

I am working on Windows 10 and Anaconda. Please help me solve this issue as I am not able to code further.

Thanks in advance!

Sharma-Prachi avatar Dec 12 '18 20:12 Sharma-Prachi

I was trying to solve the issue in python command line but now I tried the code on Jupyter notebook and wrote: parts = video.split('/')

The code is working properly now.

Sharma-Prachi avatar Dec 13 '18 07:12 Sharma-Prachi

Change it to parts = os.path.split(video)

ElliotWood avatar Jan 14 '19 05:01 ElliotWood