bibanon / tubeup

Use yt-dlp to download video and upload to the Internet Archive with metadata.
https://pypi.python.org/pypi/tubeup/
GNU General Public License v3.0
414 stars 69 forks source link

Temporary failure in name resolution / AttributeError: 'NoneType' object has no attribute 'get' #92

Closed mariomadproductions closed 5 years ago

mariomadproductions commented 5 years ago

$ tubeup https://www.instagram.com/p/Bw52XnXAjQS/

[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.02.18
[debug] Python version 3.5.3 (CPython) - Linux-4.14.98-v7+-armv7l-with-debian-9.8
[debug] exe versions: avconv 3.2.12-1, avprobe 3.2.12-1, ffmpeg 3.2.12-1, ffprobe 3.2.12-1, rtmpdump 2.4
[debug] Proxy map: {}

ERROR: Unable to download webpage: <urlopen error [Errno -3] Temporary failure in name resolution> (caused by URLError(gaierror(-3, 'Temporary failure in name resolution'),))
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 605, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 2225, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 466, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/utils.py", line 1140, in https_open
    req, **kwargs)
  File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
    raise URLError(err)

An exception just occured, if you found this exception isn't related with any of your connection problem, please report this issue to https://github.com/bibanon/tubeup/issues
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/tubeup/__main__.py", line 91, in main
    use_download_archive):
  File "/usr/local/lib/python3.5/dist-packages/tubeup/TubeUp.py", line 356, in archive_urls
    urls, proxy, ydl_username, ydl_password, use_download_archive)
  File "/usr/local/lib/python3.5/dist-packages/tubeup/TubeUp.py", line 144, in get_resource_basenames
    self.create_basenames_from_ydl_info_dict(ydl, info_dict)
  File "/usr/local/lib/python3.5/dist-packages/tubeup/TubeUp.py", line 163, in create_basenames_from_ydl_info_dict
    info_type = info_dict.get('_type', 'video')
AttributeError: 'NoneType' object has no attribute 'get'
refeed commented 5 years ago

@mariomadproductions Hi, the traceback shows that the error comes from YoutubeDL, I think that YoutubeDL version is already too old as the current version of it is 2019.05.20 right now. Updating it may solve the issue. pip install YoutubeDL --upgrade.

vxbinaca commented 5 years ago

Closing because:

mariomadproductions commented 5 years ago

Sorry, I wasn't able to test that fix at the time, but will try to do so soon.

vxbinaca commented 5 years ago

@mariomadproductions just upgrade youtube-dl and your problem will literally go away. Try to keep it up to date as well. Like check once a week.

mariomadproductions commented 5 years ago

Yeah I know. I think I've probably been updating the wrong "instance" of it - not doing it through pip.

vxbinaca commented 5 years ago

Did you install it through a Linux distribution? If so, uninstall that copy and just use and maintain the pip one. Also this was in our directions on the front of the page.

mariomadproductions commented 5 years ago

Both through apt and pip. I'll uninstall the apt one.