beardypig / streamlink-portable

A script to build a portable version of Streamlink for Windows
Apache License 2.0
77 stars 18 forks source link

ovva.tv : the JSON object must be str, not 'bytes' #5

Closed karlo2105 closed 7 years ago

karlo2105 commented 7 years ago

I reproduce error with your latest streamlink release :

streamlink "https://ovva.tv/tvguide/1plus1/online"
[cli][info] Found matching plugin ovvatv for URL https://ovva.tv/tvguide/1plus1/
online
Traceback (most recent call last):
  File "C:\Users\Ddr\Downloads\streamlink\\streamlink-script.py", line 12, in <m
odule>
    main()
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink_cli\main.py", line
 952, in main
    handle_url()
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink_cli\main.py", line
 479, in handle_url
    streams = fetch_streams(plugin)
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink_cli\main.py", line
 391, in fetch_streams
    sorting_excludes=args.stream_sorting_excludes)
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink\plugin\plugin.py",
 line 321, in get_streams
    return self.streams(*args, **kwargs)
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink\plugin\plugin.py",
 line 230, in streams
    ostreams = self._get_streams()
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink\plugins\ovvatv.py"
, line 53, in _get_streams
    ovva_url = parse_json(b64decode(data.group(1)), schema=self.ovva_data_schema
)
  File "C:\Users\Ddr\Downloads\streamlink\packages\streamlink\utils\__init__.py"
, line 54, in parse_json
    json_data = json.loads(data)
  File "json\__init__.py", line 312, in loads
TypeError: the JSON object must be str, not 'bytes'
beardypig commented 7 years ago

Damn, that's a bug in streamlink. I'll get a PR ready for that right away!

karlo2105 commented 7 years ago

It affects only streamlink portable. ;)

beardypig commented 7 years ago

Seems to affect Python 3.5, but not 3.6. I think this bug affects streamlink for Python 3.3 - 3.5.

karlo2105 commented 7 years ago

I wonder why don't you stick with Python 2.7.13 for streamlink portable. It's supported until 2020 and bugs are regulary fixed.
At least I made a good deal when I decided to install streamlink development through pip + git via my personal Python choice. ;)

beardypig commented 7 years ago

Python >=3.5 has the embedded zip version available, which makes it 100x easier to make a portable package :) Plus I like Python 3.5, I'm tempted to upgrade it to Python 3.6 :p

beardypig commented 7 years ago

Should be fixed by https://github.com/streamlink/streamlink/pull/598.

karlo2105 commented 7 years ago

I confirm. ;)

beardypig commented 7 years ago

Cool, just gotta wait for someone to merge it, then the portable version will be updated soon after.

karlo2105 commented 7 years ago

I got it. When there are small commits, I update it manually. ;)