Skip to content
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

Cannot find second file download #470

Closed
1 of 4 tasks
rokeno opened this issue Jan 9, 2019 · 13 comments
Closed
1 of 4 tasks

Cannot find second file download #470

rokeno opened this issue Jan 9, 2019 · 13 comments
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed

Comments

@rokeno
Copy link

rokeno commented Jan 9, 2019

What is the purpose of your issue?

  • Bug
  • Feature Request
  • Question
  • Other

Description

While downloding a --list, the second song gets downloaded, but remains in a .temp extention file and cannot by found by the script as it does not have the mp4 extention to be converted from.

Log

DEBUG: Opening URL: https://www.youtube.com/results?sp=EgIQAQ%253D%253D&q=Florence%20%2B%20The%20Machine%20-%20Ship%20To%20Wreck%20lyrics
INFO: 2. Florence & The Machine ~ Ship To Wreck Lyrics (http://www.youtube.com/watch?v=u6VuGNJUYLc)
DEBUG: Refining songname from "Florence & The Machine ~ Ship To Wreck Lyrics" to "Florence The Machine - Ship To Wreck"
DEBUG: Cleaning any temp files and checking if "Florence The Machine - Ship To Wreck" already exists
DEBUG: Downloading from URL: https://r1---sn-x0gvfxc-vu2e.googlevideo.com/videoplayback?requiressl=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&dur=237.052&ei=iKQ1XM2vMsLcgAfb2oagDg&itag=140&mime=audio%2Fmp4&expire=1547041001&fvip=2&lmt=1540632706354560&clen=3765621&source=youtube&mv=m&id=o-AKhuhetGmacQWi5b3GoKnWcg4A3NabMBLeGOdavnGZ3c&mn=sn-x0gvfxc-vu2e%2Csn-c0q7lnly&mm=31%2C29&txp=5432432&pl=24&keepalive=yes&c=WEB&key=yt6&ip=194.126.146.46&ms=au%2Crdu&ipbits=0&initcwndbps=4175000&gir=yes&mt=1547019290&signature=32BCEB725689FC68DC639BF2D26809AA5F476E79.8A55D20BFDD07DB7EDE7E8CAF97810A3B94FB799&ratebypass=yes
DEBUG: Saving to: C:\Users\user\Music\Florence The Machine - Ship To Wreck.m4a
3,765,621 Bytes [100.00%] received. Rate: [16264 KB/s]. ETA: [0 secs]
INFO: Correcting container in "Florence The Machine - Ship To Wreck.m4a"
DEBUG: Input file and output file are going will be same during encoding, will append ".temp" to input file just before starting encoding to avoid conflict
DEBUG: ['ffmpeg', '-y', '-i', 'C:\Users\user\Music\Florence The Machine - Ship To Wreck.m4a.temp', '-acodec', 'copy', '-b:a', '192k', '-vn', 'C:\Users\user\Music\Florence The Machine - Ship To Wreck.m4a']
WARNING: Could not find ffmpeg, skipping conversion
INFO: Applying metadata
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mutagen_util.py", line 235, in _openfile
fileobj = open(filename, "rb+" if writable else "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\user\Music\Florence The Machine - Ship To Wreck.m4a'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\user\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\Scripts\spotdl.exe_main
.py", line 9, in
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\spotdl.py", line 62, in main
match_args()
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\spotdl.py", line 38, in match_args
list_dl.download_list()
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 196, in download_list
return self._download_list()
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 205, in _download_list
track_dl.download_single()
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 114, in download_single
return self._download_single(songname)
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 137, in _download_single
os.path.join(const.args.folder, output_song), self.meta_tags
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\metadata.py", line 33, in embed
return embed.as_m4a()
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\metadata.py", line 106, in as_m4a
audiofile = MP4(music_file)
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mutagen_file.py", line 49, in init
self.load(*args, **kwargs)
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mutagen_util.py", line 139, in wrapper
writable, create) as h:
File "c:\users\user\appdata\local\programs\python\python37-32\lib\contextlib.py", line 112, in enter
return next(self.gen)
File "c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\mutagen_util.py", line 256, in _openfile
raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: 'C:\Users\user\Music\Florence The Machine - Ship To Wreck.m4a'

@ritiek ritiek added the Bug Unexpected problem or unintended behavior that needs to be fixed label Jan 9, 2019
@ritiek ritiek added the URGENT label Jan 11, 2019
@ritiek
Copy link
Member

ritiek commented Jan 11, 2019

This has probably been caused by the merge of #459. I'll take a look soon. I'm amazed something like this wasn't caught by our test suite. We'll also need to add a regression test once this is fixed.

@rokeno
Copy link
Author

rokeno commented Jan 11, 2019

Thanks. That sounds like a good path forward :)

@ritiek
Copy link
Member

ritiek commented Jan 15, 2019

#475 should fix this but I'll keep this open to serve a reminder to add a regression test.

@jvolker
Copy link

jvolker commented Feb 4, 2019

I have the same issue.
Is there a way to make use of the fix before the next release? Thanks.

@ritiek
Copy link
Member

ritiek commented Feb 4, 2019

@jvolker

$ git clone https://github.com/ritiek/spotify-downloader
$ cd spotify-downloader
$ pip3 install .

@jvolker
Copy link

jvolker commented Feb 4, 2019

@ritiek Awesome, thanks!

@rickywangca
Copy link

Hi, I have this issue as well, and I have installed the latest spot-dl from @jvolker 's post above, but still get this odd error. Any solutions?

@hughesjs
Copy link

Can confirm I'm also having this issue intermittently on the latest build

@BasilBeirouti
Copy link

I am also having this issue

@multicolorist
Copy link

Also seeing this issue with quite a few songs, and not only for playlists as per OP. It's always the same songs causing it though, here's an example that reliably does it for me:
spotdl --output-ext .m4a --song https://open.spotify.com/track/2rnONdiE5CpLdmtNspVnTx?si=yJLW-j_dTcu1EvCKG6sJ1Q -ll 'DEBUG'

@Seluj78
Copy link

Seluj78 commented May 9, 2020

Also having this error

(venv) ➜  spotdl spotdl -f . -l apashe.txt -ll "DEBUG"
INFO: Checking and removing any duplicate tracks in reading apashe.txt
INFO: Overriding apashe.txt with unique tracks
INFO: Preparing to download 11 songs

DEBUG: Input song is a Spotify URL
DEBUG: Fetching metadata for given track URL
DEBUG: Fetching lyrics
DEBUG: {'album': {'album_type': 'album',
               'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1fd3fmwlhrDl2U5wbbPQYN'},
                            'href': 'https://api.spotify.com/v1/artists/1fd3fmwlhrDl2U5wbbPQYN',
                            'id': '1fd3fmwlhrDl2U5wbbPQYN',
                            'name': 'Apashe',
                            'type': 'artist',
                            'uri': 'spotify:artist:1fd3fmwlhrDl2U5wbbPQYN'}],
               'external_urls': {'spotify': 'https://open.spotify.com/album/4aN2EaQB4G7z6BqcEClnMd'},
               'href': 'https://api.spotify.com/v1/albums/4aN2EaQB4G7z6BqcEClnMd',
               'id': '4aN2EaQB4G7z6BqcEClnMd',
               'images': [{'height': 640,
                           'url': 'https://i.scdn.co/image/ab67616d0000b27319f1f25ed3e75a629899ef12',
                           'width': 640},
                          {'height': 300,
                           'url': 'https://i.scdn.co/image/ab67616d00001e0219f1f25ed3e75a629899ef12',
                           'width': 300},
                          {'height': 64,
                           'url': 'https://i.scdn.co/image/ab67616d0000485119f1f25ed3e75a629899ef12',
                           'width': 64}],
               'name': 'Renaissance',
               'release_date': '2020-04-08',
               'release_date_precision': 'day',
               'total_tracks': 13,
               'type': 'album',
               'uri': 'spotify:album:4aN2EaQB4G7z6BqcEClnMd'},
     'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/1fd3fmwlhrDl2U5wbbPQYN'},
                  'href': 'https://api.spotify.com/v1/artists/1fd3fmwlhrDl2U5wbbPQYN',
                  'id': '1fd3fmwlhrDl2U5wbbPQYN',
                  'name': 'Apashe',
                  'type': 'artist',
                  'uri': 'spotify:artist:1fd3fmwlhrDl2U5wbbPQYN'},
                 {'external_urls': {'spotify': 'https://open.spotify.com/artist/2SeRP5iAIhVec4azKHJzjX'},
                  'href': 'https://api.spotify.com/v1/artists/2SeRP5iAIhVec4azKHJzjX',
                  'id': '2SeRP5iAIhVec4azKHJzjX',
                  'name': 'Instasamka',
                  'type': 'artist',
                  'uri': 'spotify:artist:2SeRP5iAIhVec4azKHJzjX'}],
     'copyright': '2020 Kannibalen Records',
     'disc_number': 1,
     'duration': 163.5,
     'explicit': True,
     'external_ids': {'isrc': 'CA5KR1981274'},
     'external_urls': {'spotify': 'https://open.spotify.com/track/45yj92asiOxf45vXfjeTwF'},
     'genre': 'Bass Trap',
     'href': 'https://api.spotify.com/v1/tracks/45yj92asiOxf45vXfjeTwF',
     'id': '45yj92asiOxf45vXfjeTwF',
     'is_local': False,
     'lyrics': 'Produced by',
     'name': 'Uebok Gotta Run',
     'popularity': 51,
     'preview_url': 'https://p.scdn.co/mp3-preview/fecce9e4bc71401bb0c8defa908f5eca2c59f215?cid=4fe3fecfe5334023a1472516cc99d805',
     'publisher': 'Kannibalen Records',
     'release_date': '2020-04-08',
     'spotify_metadata': True,
     'total_tracks': 13,
     'track_number': 6,
     'type': 'track',
     'uri': 'spotify:track:45yj92asiOxf45vXfjeTwF',
     'year': '2020'}
DEBUG: Opening URL: https://www.youtube.com/results?sp=EgIQAQ%253D%253D&q=Apashe%20-%20Uebok%20Gotta%20Run%20lyrics
INFO: 1. Apashe ft. Instasamka - Uebok (Gotta Run) [Official Video] (http://www.youtube.com/watch?v=286jXjwdst0)
DEBUG: Refining songname from "Apashe ft. Instasamka - Uebok (Gotta Run) [Official Video]" to "Apashe - Uebok Gotta Run"
DEBUG: Cleaning any temp files and checking if "Apashe - Uebok Gotta Run" already exists
DEBUG: Downloading from URL: https://r1---sn-cv0tb0xn-jqbes.googlevideo.com/videoplayback?expire=1589040420&ei=xIC2Xu6iC9qzxN8PrvuJ-AM&ip=89.84.117.223&id=o-AO07ah9cc7RBQbLj8Me9PyJay6xFsxgy2n98kkVbejrP&itag=140&source=youtube&requiressl=yes&mh=j3&mm=31%2C29&mn=sn-cv0tb0xn-jqbes%2Csn-25ge7nsd&ms=au%2Crdu&mv=m&mvi=0&pl=21&initcwndbps=725000&vprv=1&xtags=tx%3D23791946&mime=audio%2Fmp4&gir=yes&clen=2621988&dur=161.959&lmt=1581628298602472&mt=1589018727&fvip=1&keepalive=yes&c=WEB&txp=1111222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cxtags%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJpPlLswRQIgZiHGQHp7AjAVuxjuuoX0cGnsKmLu-A2POHefPDvPUxACIQDL6gmCkXW-Q9cjn6Kor7fVR2s-XcXqpkblhuWquTbjuQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=ALrAebAwRQIhAKX9pov9hm1z1sEUydtNfbR3bIW8v2Yz1tMv2xssMGkKAiBQ3AjvJ1YPpISYPcPQS90cRd15EXkPpqgD50VMTz3jyA%3D%3D&ratebypass=yes
DEBUG: Saving to: ./Apashe - Uebok Gotta Run.m4a
  2,621,988.0 Bytes [100.00%] received. Rate: [8335 KB/s].  ETA: [0 secs]

INFO: Converting Apashe - Uebok Gotta Run.m4a to mp3
DEBUG: ['ffmpeg', '-y', '-nostdin', '-i', './Apashe - Uebok Gotta Run.m4a', '-codec:v', 'copy', '-codec:a', 'libmp3lame', '-ar', '48000', '-b:a', '192k', '-vn', './Apashe - Uebok Gotta Run.mp3']
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
  Referenced from: /usr/local/opt/p11-kit/lib/libp11-kit.0.dylib
  Reason: image not found
DEBUG: Removing original file: "./Apashe - Uebok Gotta Run.m4a"
INFO: Applying metadata
Traceback (most recent call last):
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/mutagen/_util.py", line 235, in _openfile
    fileobj = open(filename, "rb+" if writable else "rb")
FileNotFoundError: [Errno 2] No such file or directory: './Apashe - Uebok Gotta Run.mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/seluj78/Downloads/spotdl/venv/bin/spotdl", line 8, in <module>
    sys.exit(main())
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/spotdl.py", line 68, in main
    match_args()
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/spotdl.py", line 40, in match_args
    list_dl.download_list()
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/downloader.py", line 204, in download_list
    return self._download_list()
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/downloader.py", line 213, in _download_list
    track_dl.download_single()
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/downloader.py", line 120, in download_single
    return self._download_single(songname)
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/downloader.py", line 146, in _download_single
    os.path.join(const.args.folder, output_song), self.meta_tags
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/metadata.py", line 36, in embed
    return embed.as_mp3()
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/spotdl/metadata.py", line 60, in as_mp3
    audiofile = EasyID3(music_file)
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/mutagen/easyid3.py", line 170, in __init__
    self.load(filename)
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/mutagen/_util.py", line 169, in wrapper
    return func(*args, **kwargs)
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/mutagen/_util.py", line 139, in wrapper
    writable, create) as h:
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/Users/seluj78/Downloads/spotdl/venv/lib/python3.7/site-packages/mutagen/_util.py", line 256, in _openfile
    raise MutagenError(e)
mutagen.MutagenError: [Errno 2] No such file or directory: './Apashe - Uebok Gotta Run.mp3'

@Seluj78
Copy link

Seluj78 commented May 9, 2020

For me, running brew upgrade fixed it. Seemed like it was an error with libffi

@ghost
Copy link

ghost commented Oct 7, 2020

Shouldn't be an issue in v3.

I know it's late, just clearing out old issues.

@ghost ghost closed this as completed Oct 7, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed
Projects
None yet
Development

No branches or pull requests

8 participants