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

Blackout error in script but not in browser #43

Open
MatthewDykeman opened this issue Aug 5, 2020 · 6 comments
Open

Blackout error in script but not in browser #43

MatthewDykeman opened this issue Aug 5, 2020 · 6 comments

Comments

@MatthewDykeman
Copy link

Attempting to stream nyy-phi for today's (8/5) game and I'm hitting a blackout error in streamglob, but not in the browser.
Not sure what could be causing it

verbose response below:

% streamglob -v download://mlb/2020-08-05.nyy couldn't find command for mpv 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_item_id, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column feed, width: given, 32 2020-08-05 17:16:37 [ columns:128 ] [ debug] column created, width: given, 19 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_type, width: given, 4 2020-08-05 17:16:37 [ columns:128 ] [ debug] column title, width: weight, 1 2020-08-05 17:16:37 [ base:182 ] [ warning] couldn't initialize configuration for instagram 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: MLB 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'MLB') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Video 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Video') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Video 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Video') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: 720p 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', '720p') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: 720p 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', '720p') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Live 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Live') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Live 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Live') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column start, width: given, 6 2020-08-05 17:16:37 [ columns:128 ] [ debug] column away_team_box, width: given, 16 2020-08-05 17:16:37 [ columns:128 ] [ debug] column home_team_box, width: given, 16 2020-08-05 17:16:37 [ columns:128 ] [ debug] column line, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_available, width: given, 10 2020-08-05 17:16:37 [ columns:128 ] [ debug] column game_id, width: weight, 1 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Video 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Video') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Video 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Video') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: 720p 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', '720p') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Live 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Live') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Live 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Live') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column start, width: given, 6 2020-08-05 17:16:37 [ columns:128 ] [ debug] column away_team_box, width: given, 16 2020-08-05 17:16:37 [ columns:128 ] [ debug] column home_team_box, width: given, 16 2020-08-05 17:16:37 [ columns:128 ] [ debug] column line, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_available, width: given, 10 2020-08-05 17:16:37 [ columns:128 ] [ debug] column game_id, width: weight, 1 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Any 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Any') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_item_id, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column feed, width: given, 32 2020-08-05 17:16:37 [ columns:128 ] [ debug] column created, width: given, 19 2020-08-05 17:16:37 [ columns:128 ] [ debug] column title, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column is_live, width: given, 10 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: Any 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'Any') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_item_id, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column feed, width: given, 32 2020-08-05 17:16:37 [ columns:128 ] [ debug] column created, width: given, 19 2020-08-05 17:16:37 [ columns:128 ] [ debug] column title, width: weight, 1 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column channel, width: given, 32 2020-08-05 17:16:37 [ columns:128 ] [ debug] column created, width: given, 19 2020-08-05 17:16:37 [ columns:128 ] [ debug] column title, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column index, width: weight, 1 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ dropdown:822 ] [ debug] select: All 2020-08-05 17:16:37 [ dropdown:108 ] [ debug] set_label: ('dropdown_text', 'All') 2020-08-05 17:16:37 [ columns:128 ] [ debug] column media_item_id, width: weight, 1 2020-08-05 17:16:37 [ columns:128 ] [ debug] column feed, width: given, 32 2020-08-05 17:16:37 [ columns:128 ] [ debug] column created, width: given, 19 2020-08-05 17:16:37 [ columns:128 ] [ debug] column title, width: weight, 1 2020-08-05 17:16:37 [ __main__:671 ] [ debug] streamglob starting 2020-08-05 17:16:37 [ bam:1848] [ debug] getting schedule: 1, None, 2020-08-05, 2020-08-05, None, None, None 2020-08-05 17:16:37 [ bam:1876] [ debug] http://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=2020-08-05&endDate=2020-08-05&gameType=&gamePk=&teamId=&hydrate=linescore,team,game(content(summary,media(epg),editorial(preview,recap),highlights(highlights(items)))) 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631220 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631127 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 630497 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 630591 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631339 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 630878 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 630972 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631140 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631570 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 630307 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631417 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631518 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631544 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631174 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 630110 2020-08-05 17:16:39 [ bam:1031] [ debug] geting media for game 631085 2020-08-05 17:16:40 [ bam:1031] [ debug] geting media for game 631043 2020-08-05 17:16:40 [ bam:1031] [ debug] geting media for game 631471 2020-08-05 17:16:40 [ bam:1031] [ debug] geting media for game 630994 2020-08-05 17:16:40 [ bam:1031] [ debug] geting media for game 631320 2020-08-05 17:16:40 [ bam:1848] [ debug] getting schedule: 1, None, 2020-08-05, 2020-08-05, None, 147, None 2020-08-05 17:16:40 [ bam:1876] [ debug] http://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=2020-08-05&endDate=2020-08-05&gameType=&gamePk=&teamId=147&hydrate=linescore,team,game(content(summary,media(epg),editorial(preview,recap),highlights(highlights(items)))) 2020-08-05 17:16:41 [ bam:2191] [ debug] milestones: {'Start': 3304, 'T1': 3665, 'B1': 4303, 'T2': 4998, 'B2': 5550, 'T3': 6081, 'B3': 7333, 'T4': 7749, 'Live': None} 2020-08-05 17:16:41 [ tasks:89 ] [ debug] task_manager starting 2020-08-05 17:16:41 [ mlb:679 ] [ debug] getting stream https://edge.svcs.mlb.com/media/d1c4bedb-d56e-40bf-8056-88be449fe7a8/scenarios/browser~csai 2020-08-05 17:16:42 [ mlb:684 ] [ debug] stream response: {'errors': ['blackout']} 2020-08-05 17:16:42 [ player:185 ] [ info] get: streamlink 2020-08-05 17:16:43 [ player:641 ] [ error] [] 2020-08-05 17:16:43 [ player:185 ] [ info] get: streamlink 2020-08-05 17:16:43 [ player:655 ] [ error] 2020-08-05 17:16:43 [ player:185 ] [ info] get: streamlink 2020-08-05 17:16:43 [ __main__:605 ] [ error] 'StreamlinkDownloader' object is not an iterator NoneType: None

@tonycpsu
Copy link
Owner

tonycpsu commented Aug 5, 2020

Might be an issue with the unstable branch. Try:

 pip install -U git+https://github.com/tonycpsu/streamglob@stable

@mkomko
Copy link
Contributor

mkomko commented Apr 3, 2021

This also happens to me when trying to get a game from today using the stable branch! Games from past days work fine.
I can also play it in the browser and I'm definitely not blacked out as I'm in Europe.

$ streamglob mlb/pit
2021-04-03 23:37:43 [           tasks:70  ] [   debug] task_manager starting
2021-04-03 23:37:43 [          player:215 ] [   debug] source: [BAMMediaSource(provider_id='mlb', url=None, media_type='video', game_id=634643, media_id='f9935fe8-3684-45d2-95db-a898bf5bdf8a', title='', description='', state='live', call_letters='ATTP', language='', feed_type='Away', free=False, playbacks=[])], player: {'media_types': {'video'}}, helper: streamlink
2021-04-03 23:37:43 [             mlb:334 ] [   debug] access_token: [...]
2021-04-03 23:37:43 [             mlb:513 ] [   debug] getting stream https://edge.svcs.mlb.com/media/f9935fe8-3684-45d2-95db-a898bf5bdf8a/scenarios/browser~csai
2021-04-03 23:37:43 [             mlb:518 ] [   debug] stream response: {'errors': ['blackout']}
2021-04-03 23:37:43 [          player:234 ] [ warning] ['blackout']
Traceback (most recent call last):
  File "/home/mko/.local/bin/streamglob", line 33, in <module>
    sys.exit(load_entry_point('streamglob==0.0.11.dev0', 'console_scripts', 'streamglob')())
  File "/home/mko/.local/lib/python3.9/site-packages/streamglob/__main__.py", line 660, in main
    run_cli(action, provider, selection, **opts)
  File "/home/mko/.local/lib/python3.9/site-packages/streamglob/__main__.py", line 586, in run_cli
    program.proc.wait()
AttributeError: 'NoneType' object has no attribute 'proc'

I would appreciate any help debugging! Does anyone else have the same problem?
Thank you very much in advance.

@GTRcktSci
Copy link

Was there ever a solution found with this @mkomko? Streamglob was working fine for me until a few weeks ago, now I'm having this problem. Can watch in browser with no problem, but get a blackout exception error when trying to watch in streamglob.

@mkomko
Copy link
Contributor

mkomko commented Aug 13, 2021

@GTRcktSci My problem was related to VPN usage. My linux machine is always connected to a VPN (just for anonymity, not location masking). I only get the blackout exception when connected to the VPN. I used the browser on a different machine, so the problem did not occur there.

@GTRcktSci
Copy link

GTRcktSci commented Aug 13, 2021 via email

@mkomko
Copy link
Contributor

mkomko commented Aug 13, 2021

@GTRcktSci I rather think that MLBAM is actively monitoring for known VPN IP addresses or other VPN hints, since the VPN server I use is located in the country where I live, and that is never blacked out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants