Friss / random-gif-maker

Creates a Random GIF from random movies in a directory. Also includes a Twitter Bot
4 stars 0 forks source link

Error after enter movies directory #1

Open CrisBMoya opened 8 years ago

CrisBMoya commented 8 years ago

Hi, I recently started to use the Random Gif Maker script, but It throws me an error after the movies directory. Don't know if I'm making something wrong or if it's something wrong with the script.

This is how I run it:

biolinuxpc@BioLinuxPC[biolinuxpc] python /home/biolinuxpc/Downloads/random-gif-maker-master/randomGif.py 
Enter Path to Movie Directory: /home/biolinuxpc/Videos
Movies Path:  /home/biolinuxpc/Videos
Traceback (most recent call last):
  File "/home/biolinuxpc/Downloads/random-gif-maker-master/randomGif.py", line 74, in <module>
    moviename, hour, mins, secs = makeGif(var)
  File "/home/biolinuxpc/Downloads/random-gif-maker-master/randomGif.py", line 38, in makeGif
    moviename = moviepath[root.__len__():].split("/")[2] #Remove Root Directory and Subfolder
IndexError: list index out of range

Inside my Videos folder is a single video named Test.mkv

I already have tried with:

/home/biolinuxpc/Videos /home/biolinuxpc/Videos/ /home/biolinuxpc/Videos/Test.mkv

And some other variances. Didn't work.

Thanks in advance.

Friss commented 8 years ago

Thanks for checking this out!

I haven't worked with this code in awhile but I'll take a stab at seeing what is broken and see if I can help you out. More than likely its the program that is broken.

Friss commented 8 years ago

A quick note is that the way I programmed this believes that movies would be organized like so

/path/to/movies/MovieName/MovieFile.mkv

So I would try moving your Test.mkv into /Test/Test.mkv

CrisBMoya commented 8 years ago

With the route

/home/biolinuxpc/Test/

didn't work either, same error.

Also tried with:

/home/biolinuxpc/Test/Test
/home/biolinuxpc/Test/Test.mkv