ytmdl: Download fails while searching for metadata
Bug report
Checklist
- I have searched for similar bugs in the issues.
- I will add the bug label to this issue.
Version Info
- Ytmdl version:
2020.11.20-1 - Youtube-dl version:
2020.09.20
How Ytmdl was installed?
Installed via pip
Console Log
mrmeszaros@big-della ~> ytmdl "Abigél Musical - Hazatér a sok hős" --level DEBUG
==> Logger running in DEBUG mode
==> Passed args: Namespace(SONG_NAME=['Abigél Musical - Hazatér a sok hős'], album=None, artist=None, choice=None, disable_file=False, disable_metaadd=False, format='mp3', get_opts=False, ignore_errors=False, level='DEBUG', list=None, list_level=False, manual_meta=False, nolocal=False, pl_end=None, pl_items=None, pl_start=None, proxy=None, quiet=False, skip_meta=False, song=None, trim=False, url=None)
==> ['Abigél Musical - Hazatér a sok hős']
==> Abigél Musical - Hazatér a sok hős
==> Searching to see if already present in /home/mrmeszaros/Music
==> Abigél Musical - Hazatér a sok hős found.
Do you still want to continue[y/n]y
==> proxy passed: None
==> Passed format: mp3
==> Searching Youtube for Abigél Musical - Hazatér a sok hős
==> Choose One (One with [M] is verified music)
[1] Abigél Musical - Hazatér a sok hős (Part 15) by Drsuni with dur 3:28
[2] Abigél Hazatér a sok hős by emeriko2222 with dur 2:40
[3] Abigél I.-II. rész by Frozen Hell with dur 2:18:22
[4] Somogyi Szilárd-Kocsák Tibor-Miklós Tibor: Abigél (musical) by Karantén színház with dur 2:34:06
[5] Abigél Musical - Tiszta jellem ( Part 18 ) by Drsuni with dur 5:52
[0] More results
==> Enter Choice [default is 1]
==> {'title': 'Abigél Musical - Hazatér a sok hős (Part 15)', 'href': '/watch?v=yYZkFMbu6AE', 'author_name': 'Drsuni', 'duration': '3:28', 'verified_music': False}
==> Downloading Abigél Musical - Hazatér a sok hős (Part 15) in 320kbps
==> Saving the files to: /home/mrmeszaros/.cache/ytmdl
==> /home/mrmeszaros/.cache/ytmdl/Abigél#Musical#-#Hazatér#a#sok#hős##(Part#15).mp3
3 MB | 4 Mb/s || ETA: 5 s |▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 100% ==> Downloaded!
==> Converting to mp3...
File '/home/mrmeszaros/.cache/ytmdl/Abigél#Musical#-#Hazatér#a#sok#hős##(Part#15).mp3_new.mp3' already exists. Overwrite ? [y/N] y
==> Skip Meta: False
==> Getting song data for Abigél Musical - Hazatér a sok hős...
==> No results found with the keyword Abigél Musical - Hazatér a sok hős
Traceback (most recent call last):
File "/home/mrmeszaros/.local/lib/python3.8/site-packages/ytmdl/metadata.py", line 30, in get_from_itunes
SONG_INFO = itunespy.search_track(SONG_NAME)
File "/home/mrmeszaros/.local/lib/python3.8/site-packages/itunespy/__init__.py", line 107, in search_track
return search(term, country, 'music', entities['song'], attribute, limit)
File "/home/mrmeszaros/.local/lib/python3.8/site-packages/itunespy/__init__.py", line 56, in search
raise LookupError(search_error + str(term))
LookupError: No results found with the keyword Abigél Musical - Hazatér a sok hős
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mrmeszaros/.local/bin/ytmdl", line 469, in <module>
extract_data()
File "/home/mrmeszaros/.local/bin/ytmdl", line 464, in extract_data
main(args)
File "/home/mrmeszaros/.local/bin/ytmdl", line 384, in main
TRACK_INFO = metadata.SEARCH_SONG(song_metadata, filters=[args.artist, args.album])
File "/home/mrmeszaros/.local/lib/python3.8/site-packages/ytmdl/metadata.py", line 170, in SEARCH_SONG
data_provider = GET_METADATA_ACTIONS.get(
File "/home/mrmeszaros/.local/lib/python3.8/site-packages/ytmdl/metadata.py", line 33, in get_from_itunes
_logger_provider_error(e, 'iTunes')
File "/home/mrmeszaros/.local/lib/python3.8/site-packages/ytmdl/metadata.py", line 23, in _logger_provider_error
".format(name, logger.get_log_file()))
AttributeError: 'Logger' object has no attribute 'get_log_file'
Description
It seems to me that ytmdl cannot find the logger to log the error message related to a song without metadata in iTunes.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 23 (13 by maintainers)
OK thanks for the clarification, much appreciated.
@mrmeszaros It might be that another version of ytmdl is present which is why you’re not able to test the latest code.
Consider uninstalling ytmdl from your package manager, for eg in Arch Linux
yay -R ytmdl. Once it is removed.Uninstall using pip
pip uninstall ytmdl. Keep doing thepipcommand until it shows that no ytmdl is present.After that check if all the installed versions are installed by running
ytmdlin the cli. It should give you an error.Once, that’s done, install the latest changes from your directory using
python setup.py install. Verify the version as well usingpip freeze | grep -i ytmdlas well asytmdl --version.It should work after that.
@mrmeszaros Sure. Just make sure you read the Contribution guidelines before that. Also, make the PR to the unstable branch.
Since this release, I’m aiming to continue the development in that branch and only merge to master if the feature is tested and working!
@mrmeszaros This is a known issue. Since half og the apps functionality is to save metadata automatically, that is why it breaks. If the song was to be copied even if meta was not found, it would just be a song with no proper file name etc which is basically the equivalent of using
youtube-dl.This is why it stops working when no meta is found.
Should be fixed now. Just update the logger in one of the following way.
If you installed from pypi:
If you installed from AUR:
@mrmeszaros Thanks for the report. The issue is from the logger being used. In this version, ytmdl has started using
simberas a logger and hence this issue. I will add a fix for this asap.