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

TypeError when using '--download-archive' for certain videos #9721

Closed
ilikehtml5 opened this issue Jun 7, 2016 · 0 comments
Closed

TypeError when using '--download-archive' for certain videos #9721

ilikehtml5 opened this issue Jun 7, 2016 · 0 comments

Comments

@ilikehtml5
Copy link

@ilikehtml5 ilikehtml5 commented Jun 7, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.06.03
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
$ youtube-dl -v http://livestream.com/bayyinahtv/events/5308989 --download-archive download.log
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://livestream.com/bayyinahtv/events/5308989', '--download-archive', 'download.log']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.06.03
[debug] Python version 3.5.1+ - Linux-4.5.0-2-amd64-x86_64-with-debian-stretch-sid
[debug] exe versions: ffmpeg 3.0.2-3, ffprobe 3.0.2-3, rtmpdump 2.4
[debug] Proxy map: {}
[livestream] Downloading JSON metadata
[livestream] 5308989: Downloading page 1
[livestream] 5308989: Downloading page 2
[download] Downloading playlist: Ramadan Exclusive: Day 1
[livestream] playlist Ramadan Exclusive: Day 1: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/__init__.py", line 421, in main
    _real_main(argv)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/__init__.py", line 411, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 1736, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 687, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 841, in process_ie_result
    reason = self._match_entry(entry, incomplete=True)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 632, in _match_entry
    if self.in_download_archive(info_dict):
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 1809, in in_download_archive
    vid_id = self._make_archive_id(info_dict)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 1802, in _make_archive_id
    return extractor.lower() + ' ' + info_dict['id']
TypeError: Can't convert 'int' object to str implicitly

Description of your issue, suggested solution and other information

The TypeError commonly occurs for Livestream links.

My solution is to wrap str() around the offending line here

Currently: return extractor.lower() + ' ' + info_dict['id']

Solution: return str(extractor.lower()) + ' ' + str(info_dict['id'])

@dstftw dstftw closed this in a26a9d6 Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.