TheaterTrailers icon indicating copy to clipboard operation
TheaterTrailers copied to clipboard

Copy Error

Open darkalchemy opened this issue 8 years ago • 11 comments

Ubuntu 16.04 Python 2.7.12

I followed the README and get this error.

[youtube] HwT879-4Wjs: Extracting video information [download] Destination: /home/darkalchemy/src/TheaterTrailers/Trailers/The New Mutants (2019)/The New Mutants (2019).mp4 [download] 100% of 9.26MiB in 00:01 Traceback (most recent call last): File "theaterTrailers.py", line 464, in main() File "theaterTrailers.py", line 140, in main updateCache(MovieDict[item]['url'], title, trailerYear) File "theaterTrailers.py", line 268, in updateCache videoDownloader(string,passedTitle,yearVar) File "theaterTrailers.py", line 308, in videoDownloader os.path.join(trailerLocation, '{0} ({1})'.format(passedTitle, yearVar), '{0} ({1})-trailer.mp4'.format(passedTitle, yearVar)) File "/usr/lib/python2.7/shutil.py", line 130, in copy2 copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: u'/media/Trailers/The New Mutants (2019)/The New Mutants (2019).mp4'

/media/Trailers/ does exist and is empty

Thanks

darkalchemy avatar Apr 11 '18 19:04 darkalchemy

Same configuration as above and same error message. Not sure what I've missed.

EoghannIrving avatar Apr 14 '18 17:04 EoghannIrving

It appears the copy2 isn't creating the folders in the path as expected. So, until the issue is fixed, I changed the TrailerLocation path to empty so that it stays in the download location. Then I created a bash script to rsync them into my media dir. I run the bash script from cron daily.

darkalchemy avatar Apr 14 '18 17:04 darkalchemy

Thanks for the suggestion. They downloaded to the local folder just fine when I left the path empty. I haven't got as far as automating anything yet.

EoghannIrving avatar Apr 14 '18 19:04 EoghannIrving

@darkalchemy

What is the full path of the location that the script is running in? What is the full path of the location that you are dropping trailers to?

Electronickss avatar May 22 '18 17:05 Electronickss

/home/darkalchemy/src/TheaterTrailers/

/media/Trailers/

But, the destination path does not matter. It simply does not create the new folder during the copy phase.

darkalchemy avatar May 23 '18 08:05 darkalchemy

2 questions on this:

  1. Has it been fixed?
  2. Whats the format of the location for Windows machines? i would assume something like "z:\trailers\ or similar?

beltic avatar Oct 29 '18 15:10 beltic

I have the same issue even with the location setting blank. Though with the setting blank, it downloaded a few trailers properly, then got stuck on Happy Death Day 2U. Also, it seems to be downloading the trailers it did get twice. One file has the name of the movie, and another has the name of the movie plus a "-trailer" appendation.

youtube] THq6KlWgiqw: Downloading webpage [youtube] THq6KlWgiqw: Downloading video info webpage [download] Destination: /Users/matt/Builds/PlexTheaterTrailers/Trailers/Happy Death Day 2U (2019)/Happy Death Day 2U (2019).mp4 [download] 0.6% of 10.83MiB at 285.45KiB/s ETA 00:38ERROR: giving up after 0 retries Traceback (most recent call last): File "./theaterTrailers.py", line 464, in main() File "./theaterTrailers.py", line 140, in main updateCache(MovieDict[item]['url'], title, trailerYear) File "./theaterTrailers.py", line 268, in updateCache videoDownloader(string,passedTitle,yearVar) File "./theaterTrailers.py", line 308, in videoDownloader os.path.join(trailerLocation, '{0} ({1})'.format(passedTitle, yearVar), '{0} ({1})-trailer.mp4'.format(passedTitle, yearVar)) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 144, in copy2 copyfile(src, dst) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 96, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: u'/Users/matt/Builds/PlexTheaterTrailers/Trailers/Happy Death Day 2U (2019)/Happy Death Day 2U (2019).mp4'

desepticon avatar Feb 12 '19 23:02 desepticon

@desepticon I believe that the cache thinks there is a file there that does not exist. I would first attempt to delete the cache and rerun the script

Electronickss avatar Feb 26 '19 05:02 Electronickss

the cache is a json file in the folder Cache

Electronickss avatar Feb 26 '19 05:02 Electronickss

The first time I reran it after deleting the cache I got this error:

2019-02-26 01:44:35,302 - WARNING - Glass Comic-Con is missing its release date Traceback (most recent call last): File "./theaterTrailers.py", line 464, in main() File "./theaterTrailers.py", line 108, in main tmdbInfo(item) File "./theaterTrailers.py", line 377, in tmdbInfo response = search.movie(query=item) File "/Users/matt/Library/Python/2.7/lib/python/site-packages/tmdbsimple/search.py", line 59, in movie response = self._GET(path, kwargs) File "/Users/matt/Library/Python/2.7/lib/python/site-packages/tmdbsimple/base.py", line 85, in _GET return self._request('GET', path, params=params) File "/Users/matt/Library/Python/2.7/lib/python/site-packages/tmdbsimple/base.py", line 80, in _request response.raise_for_status() File "/Users/matt/Library/Python/2.7/lib/python/site-packages/requests/models.py", line 940, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 429 Client Error: for url: https://api.themoviedb.org/3/search/movie?query=Fantastic+Beasts+The+Crimes+of+Grindelwald+Comic-Con&api_key=6d49721f7b3d9e70df393a51c7f54265

I ran it again though, and it worked. However, but I'm still getting two trailers. One has a "-trailer" appendation to the filename.

desepticon avatar Feb 26 '19 06:02 desepticon

The copy and download issue fixed by changing Line : 301 from: 'format': 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best', to 'format': 'bestvideo[ext=mp4]',

This fixed my download and copy issue i faced with the script

BeacauseReasons avatar Apr 15 '20 04:04 BeacauseReasons