Viblast / dash-proxy

Easy downloading and mirroring of MPEG-DASH streams
MIT License
125 stars 75 forks source link

AttributeError: 'NoneType' object has no attribute 'find' #5

Open bradisbell opened 6 years ago

bradisbell commented 6 years ago

The utilty doesn't seem to work for some of the DASH-IF test assets:

python dashproxy.py "https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/TwoPeriods/TwoPeriod_OnDemand.mpd" -o .
Running dash proxy for stream https://dash.akamaized.net/dash264/TestCasesHD/MultiPeriod_OnDemand/
TwoPeriods/TwoPeriod_OnDemand.mpd. Output goes in .
mpd=[<Element '{urn:mpeg:dash:schema:mpd:2011}Period' at 0x5675890>, <Element '{urn:mpeg:dash:sche
ma:mpd:2011}Period' at 0x567e470>]
Starting a downloader for Representation (period=0 adaptation-set=0 representation=0)
Traceback (most recent call last):
  File "dashproxy.py", line 289, in <module>
    main()
  File "dashproxy.py", line 286, in main
    run(args)
  File "dashproxy.py", line 275, in run
    return proxy.run()
  File "dashproxy.py", line 115, in run
    self.refresh_mpd()
  File "dashproxy.py", line 129, in refresh_mpd
    self.handle_mpd(mpd)
  File "dashproxy.py", line 155, in handle_mpd
    self.ensure_downloader(mpd, rep_addr)
  File "dashproxy.py", line 173, in ensure_downloader
    downloader.handle_mpd(mpd, self.get_base_url(mpd))
  File "dashproxy.py", line 204, in handle_mpd
    segment_timeline = self.mpd.segment_timeline(self.rep_addr)
  File "dashproxy.py", line 77, in segment_timeline
    return self.segment_template(rep_addr).find('mpd:SegmentTimeline', ns)
AttributeError: 'NoneType' object has no attribute 'find'

Python 2.7.14 on Windows 10 x64

yolanda123a commented 3 years ago

i have the same issue in python 3 windows 10 x64 and ubuntu windows shell virtualization. any idea how solve error i have python pip and dependence installed what more i should install for this thanks

radvaz commented 3 years ago

I had the same kind of errors when tying to download a live streaming content:

Traceback (most recent call last): File "dashproxy.py", line 289, in main() File "dashproxy.py", line 286, in main run(args) File "dashproxy.py", line 275, in run return proxy.run() File "dashproxy.py", line 115, in run self.refresh_mpd() File "dashproxy.py", line 128, in refresh_mpd mpd = xml.etree.ElementTree.fromstring(r.text) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1311, in XML parser.feed(text) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1657, in feed self._parser.Parse(data, 0) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 116169: ordinal not in range(128)

How could we fix this issue?