please improve error handling

Bug #1377794 reported by Rolf Leggewie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Youtube Dl
Fix Released
Undecided
Unassigned
youtube-dl (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

It would be good if youtube-dl had better error handling. The script can fetch from a number of sites, not only youtube. Obviously, it won't be able to fetch from everywhere and it should do better in reporting that to the user if it occurs.

$ youtube-dl http://www.handelsblatt.com/video/dirk-muellers-cash-kurs-rocket-internet-und-die-neue-new-economy-blase/10753844.html
[generic] 10753844: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 10753844: Downloading webpage
[generic] 10753844: Extracting information
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 6, in <module>
    youtube_dl.main()
  File "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 804, in main
    _real_main(argv)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/__init__.py", line 794, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 982, in download
    self.extract_info(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 493, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 158, in extract
    return self._real_extract(url)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/generic.py", line 237, in _real_extract
    bc_urls = BrightcoveIE._extract_brightcove_urls(webpage)
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/brightcove.py", line 152, in _extract_brightcove_urls
    return [cls._build_brighcove_url(m) for m in matches]
  File "/usr/lib/python2.7/dist-packages/youtube_dl/extractor/brightcove.py", line 90, in _build_brighcove_url
    object_doc = xml.etree.ElementTree.fromstring(object_str)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: mismatched tag: line 19, column 2

Tags: trusty
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Ubuntu will rely on upstream to fix this. So your best bet is to make your request there.

Changed in youtube-dl (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hahah. Didn't quite realize I was talking to myself here. Took my advise and reported the error upstream at https://github.com/rg3/youtube-dl/issues/5296

Revision history for this message
Rolf Leggewie (r0lf) wrote :

This actually works with the version from github, so it's either already fixed in vivid or should be fixed in the next release cycle. Thumbs up! I don't think this warrants an SRU.

Changed in youtube-dl:
status: New → Fix Released
Revision history for this message
Unit 193 (unit193) wrote :

Marking as fixed in Ubuntu too now.

Changed in youtube-dl (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.