LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2008, 07:51 PM   #331
pheedthemonkey
LQ Newbie
 
Registered: Apr 2008
Posts: 5

Rep: Reputation: 0
A new problem.


This was working great yesterday and before. Today, I'm getting this:

Traceback (most recent call last):
File "./mlbtv.sh", line 574, in <module>
datadct['blackout'])
File "curses/wrapper.py", line 44, in wrapper
File "./mlbtv.sh", line 513, in mainloop
g.logout()
File "./mlbtv.sh", line 266, in logout
urllib2.urlopen(LOGOUT_URL)
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1115, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (104, 'Connection reset by peer')>

I can't make much out of that. Any suggestions? Keep in mind I'm an idiot.
 
Old 04-14-2008, 08:15 PM   #332
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by pheedthemonkey View Post
This was working great yesterday and before. Today, I'm getting this:

Traceback (most recent call last):
File "./mlbtv.sh", line 574, in <module>
datadct['blackout'])
File "curses/wrapper.py", line 44, in wrapper
File "./mlbtv.sh", line 513, in mainloop
g.logout()
File "./mlbtv.sh", line 266, in logout
urllib2.urlopen(LOGOUT_URL)
File "/usr/lib/python2.5/urllib2.py", line 124, in urlopen
return _opener.open(url, data)
File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
File "/usr/lib/python2.5/urllib2.py", line 1115, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (104, 'Connection reset by peer')>

I can't make much out of that. Any suggestions? Keep in mind I'm an idiot.
They're running a free preview night so everyone and their dog with a high speed connection is trying to watch a game tonight. What you're seeing is the script having trouble logging into mlb.com. The newer version that will be released either tonight or tomorrow will handle this much more gracefully. I'm still having a hard time connecting to their service but at least I see a message that tells me what's going on.

Tonight may be frustrating for most, but this is a good baking session for all my new code changes and additions the past few days. I'm doing the best I can to eliminate all vague and unhelpful errors. Unfortunately, on a night like this, all you'd get is a more friendly message telling you that you're still S.O.L.

You can keep trying or you can wait for the traffic to die down (maybe when the East Coast games finish?)
 
Old 04-14-2008, 08:19 PM   #333
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
10 minutes folks. Be sure to read the rather lengthy post here that accompanies it.
 
Old 04-14-2008, 08:52 PM   #334
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
The tarball is available here:

https://sourceforge.net/projects/mlbviewer/

PLEASE READ BEFORE DOWNLOADING: This is just for testing. It's not a real honest-to-goodness release. The docs need to be cleaned up. There are likely some rough edges. But we wanted you to have a go at it.

First thing you MUST know: configuration is now in a new place. Make a directory ~/.mlb and copy your existing config to it. This will happen automatically soon, so if you don't feel like going through the trouble, just wait a few days and it will do it for you.

Once you unpack it you have two options. You can either just run python mlbviewer.py in the directory or you can do a system install. To install system-wide, just run 'setup.py install'. This will install the libraries in a place where python can read them, and mlbivewer.py in /usr/bin/.

I will be looking into releasing a .deb soon, but for now this is easy enough to install and, if need be, to remove.

Things are as you know them, but better. Audio works, with 'a'. It defaults to home audio, but there is an audio_follow option. Also, you can select your audio_player in the options. Experiment, and let us know which players work well for you.
 
Old 04-14-2008, 09:35 PM   #335
quonset
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
I've been following this thread pretty closely... thank you guys so much for your efforts.

I'm not sure if I've messed up; using 0.1alpha5, this is what I get:

Traceback (most recent call last):
File "/usr/bin/mlbviewer.py", line 311, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/bin/mlbviewer.py", line 58, in mainloop
curses.use_default_colors()
_curses.error: use_default_colors() returned ERR

Edit: and this is my config (I only have a Gameday Audio subscription):

user = username@gmail.com
pass = password
audio_player = mplayer
audio_follow = cws

Fake edit: Is it because I'm a White Sox fan?

Last edited by quonset; 04-14-2008 at 09:51 PM.
 
Old 04-14-2008, 09:51 PM   #336
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by quonset View Post
I've been following this thread pretty closely... thank you guys so much for your efforts.

I'm not sure if I've messed up; using 0.1alpha5, this is what I get:

Traceback (most recent call last):
File "/usr/bin/mlbviewer.py", line 311, in <module>
curses.wrapper(mainloop, mycfg.data)
File "/usr/lib/python2.5/curses/wrapper.py", line 44, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/bin/mlbviewer.py", line 58, in mainloop
curses.use_default_colors()
_curses.error: use_default_colors() returned ERR

Edit: and this is my config:

user = username@gmail.com
pass = password
audio_player = mplayer
audio_follow = cws

Fake edit: Is it because I'm a White Sox fan?
Probably.

Try commenting out that line (line 58.) I'm not sure it's necessary. My copy works without it.
 
Old 04-14-2008, 10:11 PM   #337
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Oh this is so annoying! Some streams mplayer is just not happy with:

Code:
The game url parsed is:
mms://a32.v108690.c10869.g.vm.akamaistream.net/7/32/10869/v0004/mlb.download.akamai.com/10869/reflector:55911?ct5=14-Apr-08&ct1=&ct3=12263517&ct7=645343&ct4=mlb&ct6=67.188.205.133&ct8=1
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.

Playing mms://a32.v108690.c10869.g.vm.akamaistream.net/7/32/10869/v0004/mlb.download.akamai.com/10869/reflector:55911?ct5=14-Apr-08&ct1=&ct3=12263517&ct7=645343&ct4=mlb&ct6=67.188.205.133&ct8=1.
STREAM_ASF, URL: mms://a32.v108690.c10869.g.vm.akamaistream.net/7/32/10869/v0004/mlb.download.akamai.com/10869/reflector:55911?ct5=14-Apr-08&ct1=&ct3=12263517&ct7=645343&ct4=mlb&ct6=67.188.205.133&ct8=1
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a32.v108690.c10869.g.vm.akamaistream.net
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a32.v108690.c10869.g.vm.akamaistream.net[216.151.132.78]: 1755...
Connected
read error:: Operation now in progress
pre-header read failed
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a32.v108690.c10869.g.vm.akamaistream.net
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a32.v108690.c10869.g.vm.akamaistream.net[216.151.132.77]: 80...
unknown ASF streaming type
Failed, exiting.
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a32.v108690.c10869.g.vm.akamaistream.net
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a32.v108690.c10869.g.vm.akamaistream.net[12.190.48.15]: 80...
Cache size set to 4096 KBytes
Cache fill:  0.01% (400 bytes)


Exiting... (End of file)
Is anyone able to connect to the Kansas City game? I had the same problem with the Oakland archive yesterday.

Sometimes it seems to be just one game that gives me trouble (usually the one I most want to see!)
 
Old 04-14-2008, 10:15 PM   #338
dmandell
Member
 
Registered: Apr 2008
Posts: 30

Rep: Reputation: 15
Quote:
Originally Posted by daftcat View Post
Oh this is so annoying! Some streams mplayer is just not happy with:

Code:
The game url parsed is:
mms://a32.v108690.c10869.g.vm.akamaistream.net/7/32/10869/v0004/mlb.download.akamai.com/10869/reflector:55911?ct5=14-Apr-08&ct1=&ct3=12263517&ct7=645343&ct4=mlb&ct6=67.188.205.133&ct8=1
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Model: 8, Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.

Playing mms://a32.v108690.c10869.g.vm.akamaistream.net/7/32/10869/v0004/mlb.download.akamai.com/10869/reflector:55911?ct5=14-Apr-08&ct1=&ct3=12263517&ct7=645343&ct4=mlb&ct6=67.188.205.133&ct8=1.
STREAM_ASF, URL: mms://a32.v108690.c10869.g.vm.akamaistream.net/7/32/10869/v0004/mlb.download.akamai.com/10869/reflector:55911?ct5=14-Apr-08&ct1=&ct3=12263517&ct7=645343&ct4=mlb&ct6=67.188.205.133&ct8=1
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a32.v108690.c10869.g.vm.akamaistream.net
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a32.v108690.c10869.g.vm.akamaistream.net[216.151.132.78]: 1755...
Connected
read error:: Operation now in progress
pre-header read failed
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a32.v108690.c10869.g.vm.akamaistream.net
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a32.v108690.c10869.g.vm.akamaistream.net[216.151.132.77]: 80...
unknown ASF streaming type
Failed, exiting.
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET6...
Couldn't resolve name for AF_INET6: a32.v108690.c10869.g.vm.akamaistream.net
Resolving a32.v108690.c10869.g.vm.akamaistream.net for AF_INET...
Connecting to server a32.v108690.c10869.g.vm.akamaistream.net[12.190.48.15]: 80...
Cache size set to 4096 KBytes
Cache fill:  0.01% (400 bytes)


Exiting... (End of file)
Is anyone able to connect to the Kansas City game? I had the same problem with the Oakland archive yesterday.

Sometimes it seems to be just one game that gives me trouble (usually the one I most want to see!)
I'm seeing that for pretty much every game, though a few games give login errors. It's happening in the old version of the script too, so it's not a strictly a problem with the new version.
 
Old 04-14-2008, 10:20 PM   #339
quonset
LQ Newbie
 
Registered: Apr 2008
Posts: 19

Rep: Reputation: 0
Quote:
Originally Posted by daftcat View Post
Try commenting out that line (line 58.) I'm not sure it's necessary. My copy works without it.
OK, commenting out that line fixed my problem.

It works for gameday audio! When I had mplayer as my audio_player, it didn't.. but once I changed that to xine it all worked great.

Last edited by quonset; 04-14-2008 at 10:23 PM.
 
Old 04-14-2008, 10:50 PM   #340
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by dmandell View Post
I'm seeing that for pretty much every game, though a few games give login errors. It's happening in the old version of the script too, so it's not a strictly a problem with the new version.
The old firebug method worked like a charm. I know the firebug method uses a different page. I'm going to see what it takes to query that page instead. Well, I have a pretty good idea of what it takes.

If you get frustrated with mlbviewer and you want to try the firebug method, refer to my mlbplay script and mini-HOWTO at:

http://www.eds.org/~straycat/mlblinux.php

I know we do things differently than firefox so I'm going to look at how we can become identical to the firebug method.

jkr

What will it take for GameStream to have full access to the listings, e.g., all the entries in a listing instead of just the gameid. Is it possible to pass an MLBSchedule object to GameStream or is there an easier way? Basically, I want to query the same page Firefox hits which means I have to construct a URL with most of the entries from the listing. This would also let us construct a proper Referrer which brings us one step closer to being network identical to Firefox.
 
Old 04-14-2008, 11:07 PM   #341
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
jkr

This is the url we should query to get the url if the gameid is 645343:

Code:
http://mlb.mlb.com/media/player/mp_tpl_3_1.jsp?w_id=645343&w=reflector%3A55911&pid=gen_video&gid=2008/04/14/kcamlb-seamlb-1&fid=gen_video400&cid=mlb&v=3
This means we need:

w_id
w
pid
gid
fid
v

This also means we could use simplejson to parse the response.

But what's the best way to get all this data to GameStream?

Can we create a gameid dictionary that has all these entries and pass that as the gameid? (hint: Python newbie question ;-)
 
Old 04-14-2008, 11:10 PM   #342
Theophile
Member
 
Registered: Jan 2003
Posts: 283

Rep: Reputation: 35
I'm getting the problems in posts 337 and 338 above. But yesterday's archived games seem to work fine.

BTW, thanks for this! So exciting!
 
Old 04-14-2008, 11:32 PM   #343
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by Theophile View Post
I'm getting the problems in posts 337 and 338 above. But yesterday's archived games seem to work fine.

BTW, thanks for this! So exciting!
With all games or just some games?
 
Old 04-14-2008, 11:37 PM   #344
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
use_default_colors() isn't strictly necessary, but it makes it look a lot nicer, it can have transparent terminals, etc. I know it's a relatively new feature in the python curses implementation. If you're getting that error, what version are you using?

daftcat -- GameStream can have access to everything in the JSP file. Here's a sample game from today's schedule. But there's a lot of information. That's why we have the trimList step -- get the parts that are helpful. Of course, more can be added at that stage (as with audio), it will still be trimmer.

Code:
{
	condensed_video: null,
	gameid: '2008/04/15/anamlb-texmlb-1',
	teams: [{
			isHome: false,
			runs: null,
			code: 'ana'
		}, {
			isHome: true,
			runs: null,
			code: 'tex'
		}],
	status: 'P',
	event_time: ' 2:05 PM',
	home_audio: {
		blackout: 'local',
		text: 'KRLD',
		media_type: 'audio',
		urls: [{
				blackout: 'local',
				speed: '12',
				url: {
					w: 'http://web.servicebureau.net/conf/meta?i=1112958373&c=1234&m=was&u=/w2.xsl',
					w_id: '621432',
					v: '2',
					login: 'Y',
					authorization: 'Y',
					mid: '200803172433159',
					pid: 'mlb_ga',
					fid: 'h12',
					url: 'http://web.servicebureau.net/conf/meta?i=1112958373&c=1234&m=was&u=/w2.xsl',
					id: '621432',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: null
			}],
		is_free: false,
		state: 'audio_pregame'
	},
	away_audio: {
		blackout: 'local',
		text: 'KLAA',
		media_type: 'audio',
		urls: [{
				blackout: 'local',
				speed: '12',
				url: {
					w: 'http://web.servicebureau.net/conf/meta?i=1112953247&c=1234&m=was&u=/w2.xsl',
					w_id: '621434',
					v: '2',
					login: 'Y',
					authorization: 'Y',
					mid: '200803172433160',
					pid: 'mlb_ga',
					fid: 'a12',
					url: 'http://web.servicebureau.net/conf/meta?i=1112953247&c=1234&m=was&u=/w2.xsl',
					id: '621434',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: null
			}],
		is_free: false,
		state: 'audio_pregame'
	},
	extended_highlights: null,
	alt_away_audio: {
		blackout: 'local',
		text: 'KWKW',
		media_type: 'audio',
		urls: [{
				blackout: 'local',
				speed: '12',
				url: {
					w: 'http://web.servicebureau.net/conf/meta?i=1112998065&c=1234&m=was&u=/w2.xsl',
					w_id: '621438',
					v: '2',
					login: 'Y',
					authorization: 'Y',
					mid: '200803172433162',
					pid: 'mlb_ga',
					fid: 'aa12',
					url: 'http://web.servicebureau.net/conf/meta?i=1112998065&c=1234&m=was&u=/w2.xsl',
					id: '621438',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: null
			}],
		is_free: false,
		state: 'audio_pregame'
	},
	alt_home_audio: {
		blackout: 'local',
		text: 'KFLC',
		media_type: 'audio',
		urls: [{
				blackout: 'local',
				speed: '12',
				url: {
					w: 'http://web.servicebureau.net/conf/meta?i=1112971037&c=1234&m=was&u=/w2.xsl',
					w_id: '621436',
					v: '2',
					login: 'Y',
					authorization: 'Y',
					mid: '200803172433161',
					pid: 'mlb_ga',
					fid: 'ha12',
					url: 'http://web.servicebureau.net/conf/meta?i=1112971037&c=1234&m=was&u=/w2.xsl',
					id: '621436',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: null
			}],
		is_free: false,
		state: 'audio_pregame'
	},
	event_date: '04/15/2008',
	gametype: 'R',
	game_wrapup: null,
	top_play_index: null,
	mlbtv: {
		blackout: 'local',
		text: '04-15-2008 : Los Angeles Angels of Anaheim at Texas Rangers | MLB.TV',
		media_type: 'video',
		urls: [{
				blackout: 'local',
				speed: '400',
				url: {
					w: 'null',
					w_id: '645751',
					v: '3',
					login: 'Y',
					authorization: 'Y',
					mid: '200804122520838',
					pid: 'mlb_lg',
					fid: 'mlb_lg400',
					url: 'null',
					id: '645751',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: 'video_off'
			}, {
				blackout: 'local',
				speed: '800',
				url: {
					w: 'null',
					w_id: '645752',
					v: '3',
					login: 'Y',
					authorization: 'Y',
					mid: '200804122520838',
					pid: 'mlb_lg',
					fid: 'mlb_lg800',
					url: 'null',
					id: '645752',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: 'video_off'
			}, {
				blackout: 'local',
				speed: '1200',
				url: {
					w: 'null',
					w_id: '645753',
					v: '3',
					login: 'Y',
					authorization: 'Y',
					mid: '200804122520838',
					pid: 'mlb_lg',
					fid: 'mlb_lg1200',
					url: 'null',
					id: '645753',
					gid: '2008/04/15/anamlb-texmlb-1'
				},
				state: 'video_off'
			}],
		is_free: true,
		state: 'video_off'
	},
	seriescode: null,
	tbd: false
}
 
Old 04-14-2008, 11:49 PM   #345
jkr
Member
 
Registered: Apr 2008
Posts: 115

Rep: Reputation: 15
the weird thing is that when I turn on show_player_command and cut and paste it, it plays fine. So the command this is running seems to be okay... I have no idea why it's doing this. Some sort of timing issue?

And, as you said, it still works on old games, and old versions are affected as well. So it seems like, in response to their bandwidth troubles, they did something that made it harder for this script to do its work.
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration