LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   MLB.TV in Linux (https://www.linuxquestions.org/questions/linux-software-2/mlb-tv-in-linux-432479/)

daftcat 04-21-2008 03:50 PM

Quote:

Originally Posted by j3ff3r (Post 3128269)
Just pulled the latest svn. Will give feedback after using it tonight. Any plans to add daily rewind support yet?

Also, anyone know how to update codecs for VLC (or get it to use MPlayer's codecs)? I can watch the game fine in MPlayer, but if I switch to VLC, I get audio but no video.

Thanks, and keep up the great work!

Yeah, okay. How about a top plays screen that includes the daily rewind? ;) It looks like that could be implemented rather easily. I say this now but I have to look at how we'd have to implement it in the listings code. But from a quick test using the stream id's and the test/mlbgameid.py tool, it looks like these will return playable streams same as a live or archived game without any changes to the network code. (Big sigh of relief!)

I'll see about adding this in this week. I just heard from jkr and it sounds like we're getting close to another official release (perhaps next week.) I'll see if I can get this feature into svn before the weekend so others can test it before we release it.

dmandell 04-21-2008 04:13 PM

I'm just curious if you're still planning on putting starting pitchers and various other information inside of mlbviewer (by hitting "i" after selecting a game, for instance), or is that all going into mlbscores now? I'd personally rather have access to that info within mlbviewer, but of course will defer to the group.

Thanks,

d

daftcat 04-21-2008 04:26 PM

Quote:

Originally Posted by dmandell (Post 3128300)
I'm just curious if you're still planning on putting starting pitchers and various other information inside of mlbviewer (by hitting "i" after selecting a game, for instance), or is that all going into mlbscores now? I'd personally rather have access to that info within mlbviewer, but of course will defer to the group.

Thanks,

d

Eventually, yes.

I'd rather iron out all the details of what kind of information I want to include and nail down the xml code in the mlbscores app first. It's possible mlbscores might make the next release but it may not. In mlbscores, the information screen will be there for 'In Progress' games, 'Final' games, and not yet played games each displaying different kinds of information. Once that code gets tested and people put their input into what they like and don't like on those screens, we could conceivably integrate all or part of mlbscores into mlbviewer. My development design plan is to make mlbscores modular and pluggable from the start. With lessons learned from mlbscores, we'll probably revise the way we do things in mlbviewer (backend stuff you'll likely never see) to make it easier to plug in parts or the whole of mlbscores. This would also set us up in the long run to easily accomodate any new features like perhaps gameday or standings without having to rewrite the infrastructure or do messy merges.

A temporary feature (which folks might actually prefer) would be to ask for that information in the status line with the 'i' key. I'll look into that after I get top plays put in.

I was just saying to jkr that my plate was looking empty after this weekend but I guess I got a couple new features to work on. :D

pheedthemonkey 04-21-2008 06:13 PM

Don't know what this means...
 
I haven't changed anything, but all of the sudden, i get this message after the days' schedule failed to load:

Traceback (most recent call last):
File "mlbviewer.py", line 311, in <module>
curses.wrapper(mainloop, mycfg.data)
File "curses/wrapper.py", line 44, in wrapper
File "mlbviewer.py", line 65, in mainloop
available = mysched.getListings(cfg['speed'],cfg['blackout'],cfg['audio_follow'])
File "/home/ben/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 186, in getListings
listings = self.trimList()
File "/home/ben/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 159, in trimList
dct['event_time'] = datetime.time(hrs,mins)

I don't know what that means.

Help?

ilikerobots 04-21-2008 06:35 PM

Quote:

Originally Posted by fang2415 (Post 3128199)
You guys still rule, btw. I assume the silence around here is the sound of happy users of a robust product (that's the sound I'm making when I'm not posting, at least).

Indeed. I'm using the svn version and I love it. Would love to see the top plays or condensed games support.

daftcat 04-21-2008 06:49 PM

Quote:

Originally Posted by pheedthemonkey (Post 3128411)
I haven't changed anything, but all of the sudden, i get this message after the days' schedule failed to load:

Traceback (most recent call last):
File "mlbviewer.py", line 311, in <module>
curses.wrapper(mainloop, mycfg.data)
File "curses/wrapper.py", line 44, in wrapper
File "mlbviewer.py", line 65, in mainloop
available = mysched.getListings(cfg['speed'],cfg['blackout'],cfg['audio_follow'])
File "/home/ben/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 186, in getListings
listings = self.trimList()
File "/home/ben/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", line 159, in trimList
dct['event_time'] = datetime.time(hrs,mins)

I don't know what that means.

Help?

The last line of the Traceback is missing. This is perhaps the most important line because it tells me what kind of error occurred there.

However, looking at the code, I'm going to guess that it encountered a game time of 12:05 PM, tried to add 12 hours to that (because it's PM), and threw a ValueError saying it can't convert 24:05 to a datetime.

If you see an error like:

ValueError: hour must be in 0..23

at the bottom of your Traceback, on line 155 of "/home/ben/Desktop/mlbviewer-0.1alpha5/MLBviewer/mlbtv.py", change:

Code:

hrs = int(hrs)
to:

Code:

hrs = int(hrs) % 12
If you're not feeling up to editing the code, you can check out the latest svn revision which already has this fix in it by typing the following from your favorite shell:

Code:

svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer
You might have to install the subversion package if you don't have the svn command.

The downside of this approach is you're getting a lot more new code which may have it's own problems. The upside is you're getting bug fixes and new features.

Please paste the entire Traceback including the last line which says what kind of error was generated and I can confirm if this is the error you're seeing.

CartersAdvocate 04-21-2008 07:38 PM

Quote:

Originally Posted by daftcat (Post 3128281)
Yeah, okay. How about a top plays screen that includes the daily rewind? ;) It looks like that could be implemented rather easily.

That would work for me...any way to access it on my linux box would be great! New version is working without a hitch here. I like the bolding the games in progress, but what makes it update? I started the program at 8:05 which is when the Brewers @ Cardinals game was starting and it said not yet available even tho the stream was live.

Wolfvorkian 04-21-2008 08:20 PM

Quote:

Originally Posted by daftcat (Post 3128432)
The last line of the Traceback is missing. This is
If you see an error like:

ValueError: hour must be in 0..23

Thanks Straycat or daftcat.;-)

I suddenly developed the same problem. When I went to bed last night, the script was working fine. This morning it was crashing. The fix was your suggestion.

daftcat 04-22-2008 12:59 AM

Quote:

Originally Posted by j3ff3r (Post 3128462)
That would work for me...any way to access it on my linux box would be great! New version is working without a hitch here. I like the bolding the games in progress, but what makes it update? I started the program at 8:05 which is when the Brewers @ Cardinals game was starting and it said not yet available even tho the stream was live.

There's a help screen if you press 'h'. ;)

'r' will refresh the listings.

daftcat 04-22-2008 01:03 AM

Quote:

Originally Posted by Wolfvorkian (Post 3128502)
Thanks Straycat or daftcat.;-)

I suddenly developed the same problem. When I went to bed last night, the script was working fine. This morning it was crashing. The fix was your suggestion.

I love having another developer on this project because jkr was the one who fixed it. I just had to compare the svn between the last release and the latest svn to see what he did.

CartersAdvocate 04-22-2008 08:27 PM

Quote:

Originally Posted by daftcat (Post 3128726)
There's a help screen if you press 'h'. ;)

'r' will refresh the listings.

I think I worded the question wrong...I was wondering what tells the program that the stream is active, because a) it was the time it was supposed to start and b) the stream was working, but it wasn't bold on there, it still said "Not Yet Available".

daftcat 04-22-2008 11:16 PM

Quote:

Originally Posted by j3ff3r (Post 3129689)
I think I worded the question wrong...I was wondering what tells the program that the stream is active, because a) it was the time it was supposed to start and b) the stream was working, but it wasn't bold on there, it still said "Not Yet Available".

Ah, we make a request for the TV / Radio schedule when we first start up. Whenever you started the mlbviewer, your listings are frozen in that moment of time. In other words, if you started mlbviewer at 5 ET and the game starts at 8 ET, and you came back at 8 ET, your listings view would be 3 hours old. We don't update that listings view except in a few occasions:

Left/Right Navigate one day forward or back
j Jump to a date
p Toggle speed (does not change config file)
r Refresh listings

We get our information from a page like this:


http://mlb.mlb.com/components/game/y...amesbydate.jsp


So it's possible MLB gave us stale information too. In that case, there's nothing we can do.

daftcat 04-23-2008 03:48 AM

Top Plays and Game Recap support: Testers needed
 
I implemented Top Plays and Game Recap support (same screen) by highlighting a game and pressing 't'. This opens the Top Plays screen. Up and Down are as you expect them and Enter selects the highlight.

Here are a couple of things to note about Top Plays feature:

A new configuration file option top_plays_player was added so you don't have to overkill on cache for a short clip. If you don't specify this option in your config file, it will default to your video_player option. I use a 4 mb cache for a normal game but that's way too much for a 20 second clip so I have the all the same options in my top_plays_player except I changed the cache to 1024.

Certain features are disabled in the Top Plays view including any feature that would allow you to change days (Left, Right, Jump.) Basically, it doesn't make sense to navigate across days except by using the Listings view. Speed toggling and Gameday Audio also aren't supported in Top Plays screen. Basically, you'll get an error message saying, "That key is not supported in this screen..." if the feature is disabled for Top Plays screen.

All Top Plays are 400K streams so the speed indicator will automatically change to 400K to visually remind you of this fact. It will change back to whatever value you use for games when you return to the listings view.

If you don't have an MLB.com account, you can still use Top Plays feature. You still need to specify user= and pass= in the config file but you can leave the value blank. For MLB.TV subscribers, we don't login for Top Plays but we still do for games and audio.

You can get this code from svn. I need people to test the heck out of it before I feel comfortable about making it part of the next official release. (Coming soon!) I tried to cover all the scenarios, including some weird cases, but no code is ever bug free (except maybe a hello world script.)

Svn instructions are on the previous page. Please post your experiences here--good or bad.

If you encounter any Tracebacks, please post the entire Traceback here.

Cheers!
daftcat

Onip 04-23-2008 08:10 AM

Code:

$ python mlbviewer.py
Traceback (most recent call last):
  File "mlbviewer.py", line 543, 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 "mlbviewer.py", line 313, in mainloop
    cfg['audio_follow'])
  File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 288, in getListings
    self.getData()
  File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 191, in getData
    self.data = self.__jsonToPython()
  File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 186, in __jsonToPython
    return simplejson.loads(self.__scheduleToJson())
  File "/usr/lib/python2.5/site-packages/simplejson/__init__.py", line 262, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 251, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 268, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()
  File "/usr/lib/python2.5/site-packages/simplejson/scanner.py", line 50, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 171, in JSONArray
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib/python2.5/site-packages/simplejson/scanner.py", line 50, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 138, in JSONObject
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib/python2.5/site-packages/simplejson/scanner.py", line 50, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 148, in JSONObject
    raise ValueError(errmsg("Expecting , delimiter", s, end - 1))
ValueError: Expecting , delimiter: line 1 column 66499 (char 66499)

This happens when I try to change date ( I wanted to try TopPlays from yesterday's games ), both with left key and by pressing 'j'.

hanophix 04-23-2008 09:22 AM

I got the same problem, different line numbers though. Just started doing this in the morning

daftcat 04-23-2008 10:04 AM

TEMPORARY WORKAROUND FOR ValueError in simplejson
 
I get the same ValueError with ALL VERSIONS (not just the latest svn.) Since the error is coming from simplejson (the JSON parser library), it may be that MLB.com has a badly formed JSP for today's listings. I'm not sure which MLB.com pages or applications use this page, so I don't know if and when they'll fix today's jsp. Hopefully they will.

In the meantime, I've caught the ValueError exception and print a "There was a parser problem with listings page" error to the status line.

The bad news is that until they fix this or until I can find where and how it's broken, today's listings will not be available.

The good news is that every other day that has well-formed jsp will be available including yesterday's top plays. :D

Please re-pull from svn to get this latest fix. Let me know if you encounter that error again with the newest svn.

CartersAdvocate 04-23-2008 10:07 AM

Quote:

Originally Posted by Onip (Post 3130229)
Code:

$ python mlbviewer.py
Traceback (most recent call last):
  File "mlbviewer.py", line 543, 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 "mlbviewer.py", line 313, in mainloop
    cfg['audio_follow'])
  File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 288, in getListings
    self.getData()
  File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 191, in getData
    self.data = self.__jsonToPython()
  File "/home/onip/mlbviewer/MLBviewer/mlbtv.py", line 186, in __jsonToPython
    return simplejson.loads(self.__scheduleToJson())
  File "/usr/lib/python2.5/site-packages/simplejson/__init__.py", line 262, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 251, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 268, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()
  File "/usr/lib/python2.5/site-packages/simplejson/scanner.py", line 50, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 171, in JSONArray
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib/python2.5/site-packages/simplejson/scanner.py", line 50, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 138, in JSONObject
    value, end = iterscan(s, idx=end, context=context).next()
  File "/usr/lib/python2.5/site-packages/simplejson/scanner.py", line 50, in iterscan
    rval, next_pos = action(m, context)
  File "/usr/lib/python2.5/site-packages/simplejson/decoder.py", line 148, in JSONObject
    raise ValueError(errmsg("Expecting , delimiter", s, end - 1))
ValueError: Expecting , delimiter: line 1 column 66499 (char 66499)

This happens when I try to change date ( I wanted to try TopPlays from yesterday's games ), both with left key and by pressing 'j'.

Upgraded to latest svn and I get the same messages (same line numbers and everything) when trying to change dates as well.

daftcat 04-23-2008 10:08 AM

I guess I'll get more testers of the latest code than I hoped for since the badly formed jsp (at least that's what I assume it is) hoses every earlier version of mlbviewer including the last official release.

daftcat 04-23-2008 10:11 AM

Quote:

Originally Posted by j3ff3r (Post 3130332)
Upgraded to latest svn and I get the same messages (same line numbers and everything) when trying to change dates as well.

Can you update once more? I wonder if it's possible that you pulled before svn finished transmitting.

Or, can you grep MLBJsonError mlbviewer.py?

If that doesn't return at least half a dozen results, you pulled before I finished transmitting the fix.

ilikerobots 04-23-2008 10:14 AM

Quote:

Originally Posted by daftcat (Post 3130328)
Please re-pull from svn to get this latest fix. Let me know if you encounter that error again with the newest svn.

After update, I receive following when going to 4/22 games:

Code:

Traceback (most recent call last):
  File "mlbviewer.py", line 606, in <module>
    curses.wrapper(mainloop, mycfg.data)
  File "curses/wrapper.py", line 44, in wrapper
  File "mlbviewer.py", line 339, in mainloop
    cfg['audio_follow'])
  File "/home/mike/progs/mlbview/mlbviewer/trunk/MLBviewer/mlbtv.py", line 295, in getListings
    listings = self.trimList()
  File "/home/mike/progs/mlbview/mlbviewer/trunk/MLBviewer/mlbtv.py", line 203, in trimList
    raise MLBJsonError
MLBviewer.mlbtv.MLBJsonError

However [j]umping to 4/21 works ok. And the top play support is awesome.

ilikerobots 04-23-2008 10:32 AM

Oh, by the way, regarding the discussion about whether MLB would approve or not: my guess is their main concern with unauthorized clients is that it can allow people to circumvent their advertising (never mind that I use adblock). In this case, though, it's not a matter of us linux users using a client we like more than MLB's; but rather that MLB's client doesn't work at all for us.

So we wouldn't be getting any of the advertising anyway, and at least this way they still get our money for subscriptions.

daftcat 04-23-2008 10:35 AM

Everyone Must Update To Latest Svn
 
I can't tell you what happened with today's schedule page that we get from mlb.com. A library call outside of our own code is telling us that it is very likely mlb.com posted a badly formed jsp page. I just don't have the time this morning to look deeply into this. Unfortunately, the JSON to Python code is jkr's domain, but I guess I'll have to learn fast.

To update to the latest svn:

Code:

svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer
from your favorite terminal program. You will need the subversion package if you don't have the svn command.

To verify that you have the workaround:

Code:

matthew@tango:~/mlbtv/svn/mlbviewer$ grep MLBJsonError mlbviewer.py
from MLBviewer import MLBJsonError
    except MLBJsonError:
            except MLBJsonError:
            except MLBJsonError:
            except MLBJsonError:
            except MLBJsonError:
                except MLBJsonError:
                    except MLBJsonError:
            except MLBJsonError:

The bad news:
Every previous version of mlbviewer is affected by this.
Today's games may be unavailable from mlbviewer.

The good news:
Every other day (those without badly formed jsp schedules) should be available and you get the new Top Plays feature support.

How to watch today's games:
If the jsp isn't fixed by mlb.com or I'm not able to figure out how to correct for it on our end, you can still watch today's games using the mlbgameid.py script in the test directory:

First, find the stream id for the game, gameday audio, or top play you want to watch/listen to from the jsp page:

http://mlb.mlb.com/components/game/y...amesbydate.jsp

Within a particular listing there are home_audio, away_audio, mlbtv, top_play_index, and game_wrapup sections.

This is an example of a mlbtv listing:

Code:

        mlbtv: {
                blackout: 'local',
                text: '04-23-2008 : Los Angeles Angels of Anaheim at Boston Red Sox | MLB.TV',
                media_type: 'video',
                urls: [{
                                blackout: 'local',
                                speed: '400',
                                url: {
                                        w: 'null',
                                        w_id: '653960',
                                        v: '3',
                                        login: 'Y',
                                        authorization: 'Y',
                                        mid: '200804192553485',
                                        pid: 'mlb_lg',
                                        fid: 'mlb_lg400',
                                        url: 'null',
                                        id: '653960',
                                        gid: '2008/04/23/anamlb-bosmlb-1'
                                },

The speed: entry says this is a 400k stream. There will be another entry for 800k that I didn't paste above. From this listing, copy the six digit number in id: and use that as an argument to mlbgameid.py

Code:

test/mlbgameid.py 653960
This is meant to be a testing only tool so it produces a lot of output but it should eventually start playing the stream for you based on your config file player commands.

I just uploaded one more fix into svn for the mlbgameid.py script to autodetect whether it should use the video_player or audio_player config file option based on the stream url type. You'll have to check out from svn once more for this fix.

I apologize for releasing the workarounds in multiple svn's this morning. I honestly don't have time for these problems this morning but I'd rather not leave you all high and dry until tonight. If I have some more time before tonight, I'll track down the root cause of today's problems.

daftcat 04-23-2008 10:39 AM

Quote:

Originally Posted by ilikerobots (Post 3130341)
After update, I receive following when going to 4/22 games:

Code:

Traceback (most recent call last):
  File "mlbviewer.py", line 606, in <module>
    curses.wrapper(mainloop, mycfg.data)
  File "curses/wrapper.py", line 44, in wrapper
  File "mlbviewer.py", line 339, in mainloop
    cfg['audio_follow'])
  File "/home/mike/progs/mlbview/mlbviewer/trunk/MLBviewer/mlbtv.py", line 295, in getListings
    listings = self.trimList()
  File "/home/mike/progs/mlbview/mlbviewer/trunk/MLBviewer/mlbtv.py", line 203, in trimList
    raise MLBJsonError
MLBviewer.mlbtv.MLBJsonError

However [j]umping to 4/21 works ok. And the top play support is awesome.

Good catch. I was copying the six or so lines of new protection code everywhere I called getListings and pasting it after the unprotected calls. I thought I removed all the unprotected calls but I guess I missed one.

Please checkout from svn once more and tell if you still get an MLBJsonError (or ValueError for that matter.)

daftcat 04-23-2008 11:02 AM

Are we good for now?

I can look deeper into the issue later, but I want to make sure you all can watch archived games and top plays until this is fixed properly (which will probably have to come from mlb.com fixing their jsp.)

Theophile 04-23-2008 11:13 AM

I just pulled from svn and... nice! Top plays support = fabulous.

I'm able to see today's schedule, it's yesterday's (4/22) that I have problems with. It says "There was a parser problem with the listings page." Previous days work fine, though.

Thanks for all the great work on this!!

daftcat 04-23-2008 11:30 AM

Quote:

Originally Posted by Theophile (Post 3130406)
I just pulled from svn and... nice! Top plays support = fabulous.

I'm able to see today's schedule, it's yesterday's (4/22) that I have problems with. It says "There was a parser problem with the listings page." Previous days work fine, though.

Thanks for all the great work on this!!

Ah, that's what I get for waking up early. ;-) It was the "if before 9am, show yesterday's listings". So that makes more sense. Perhaps whoever added the top plays last night forgot a comma somewhere.

Well, that's good news that you all can get today's games. Maybe when they figure out their error, you can view yesterday's top plays.

jkr 04-23-2008 12:02 PM

Hey all,

Long time no see.

Just wanted to let you know that I figured out the cause of yesterday's hiccup (their unwonted use of a double quote in a play description) and I'll have a fix up quite soon.

UPDATE: Fixed in svn.

turf212 04-23-2008 12:10 PM

Hmmm. Just pulled the latest svn. Getting a "there was a parser error with the listings page" followed by "No listings available for today". Tried going back a day and jumping to another day. No difference. Direct link to mlb listings as given earlier on the thread and I get something back. Putting it into debug mode didnt make any difference.

Thoughts?

*edit* This is on a laptop. I'll try it on my usual PC later.

jkr 04-23-2008 12:39 PM

Quote:

Originally Posted by turf212 (Post 3130457)
Hmmm. Just pulled the latest svn. Getting a "there was a parser error with the listings page" followed by "No listings available for today". Tried going back a day and jumping to another day. No difference. Direct link to mlb listings as given earlier on the thread and I get something back. Putting it into debug mode didnt make any difference.

Thoughts?

Don't know what to tell you. All days work here -- strange. Did you make some local changes (the hours bugfix, maybe?) so the update isn't overwriting?

Try doing a fresh pull into another directory:

Code:

svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer-test
And run it in there.

Theophile 04-23-2008 01:02 PM

I can confirm the latest svn fixes the 4/22 bug for me.

daftcat 04-23-2008 01:18 PM

Quote:

Originally Posted by turf212 (Post 3130457)
Hmmm. Just pulled the latest svn. Getting a "there was a parser error with the listings page" followed by "No listings available for today". Tried going back a day and jumping to another day. No difference. Direct link to mlb listings as given earlier on the thread and I get something back. Putting it into debug mode didnt make any difference.

Thoughts?

*edit* This is on a laptop. I'll try it on my usual PC later.

I'm guessing just based on the time difference between this post and jkr's that you just missed his check-in. Try checking it out again.

I'll see if I can re-raise the Exception when debug is enabled just in case we're masking something else. Debug is intended to let most errors drop through like a lead ball so we can find the "unknown" errors.

jkr 04-23-2008 01:22 PM

Quote:

Originally Posted by daftcat (Post 3130532)
I'm guessing just based on the time difference between this post and jkr's that you just missed his check-in. Try checking it out again.

I'll see if I can re-raise the Exception when debug is enabled just in case we're masking something else. Debug is intended to let most errors drop through like a lead ball so we can find the "unknown" errors.

Well, this particular error definitely came from the double quote. I ran the steps one at a time, and it gave me the particular place in the JSP that it barfed on (i.e., the character where the parsing got confused). There might be other errors masked there, but the one that was biting people yesterday came from that issue.

daftcat 04-23-2008 01:46 PM

Quote:

Originally Posted by jkr (Post 3130537)
Well, this particular error definitely came from the double quote. I ran the steps one at a time, and it gave me the particular place in the JSP that it barfed on (i.e., the character where the parsing got confused). There might be other errors masked there, but the one that was biting people yesterday came from that issue.

No doubt.

If we get future Json errors, the commit I'm making will spit out the character information if debugging is enabled.

Code:

matthew@tango:~/mlbtv/svn/mlbviewer$ ./mlbviewer.py
Traceback (most recent call last):
  File "./mlbviewer.py", line 619, in ?
    curses.wrapper(mainloop, mycfg.data)
  File "curses/wrapper.py", line 44, in wrapper
  File "./mlbviewer.py", line 448, in mainloop
    raise Exception,detail
MLBviewer.mlbtv.MLBJsonError: Expecting , delimiter: line 1 column 66499 (char 66499)

This way if there are any other json error conditions we're missing, e.g. the "There was an error in parsing" message comes back, we can track it down easily by enabling debug.

EDIT: Verified with Debug enabled that parser error isn't raised so your fix is golden. Thanks a million!

CartersAdvocate 04-23-2008 01:46 PM

Quote:

Originally Posted by daftcat (Post 3130337)
Can you update once more? I wonder if it's possible that you pulled before svn finished transmitting.

Or, can you grep MLBJsonError mlbviewer.py?

If that doesn't return at least half a dozen results, you pulled before I finished transmitting the fix.

Yep, I had an old version...grep didn't return anything. I upgraded and it's working now.

Thanks for the Daily Rewind support and keep up the good work you two!

hanophix 04-23-2008 02:01 PM

I don't know if I am pulling the newest svn off correctly...I am not getting anything when I press J for jumping to a day....I am still getting traceback errors. How do I know whether I am picking up the latest version?
____________________________________________________________________
Newbie error....Got it situated!

daftcat 04-23-2008 02:13 PM

Quote:

Originally Posted by hanophix (Post 3130574)
I don't know if I am pulling the newest svn off correctly...I am not getting anything when I press J for jumping to a day....I am still getting traceback errors. How do I know whether I am picking up the latest version?

You should see something like this:

Code:

matthew@tango:~$ svn co https://mlbviewer.svn.sourceforge.net/svnroot/mlbviewer/trunk mlbviewer-test
A    mlbviewer-test/test
A    mlbviewer-test/test/mlbgameid.py
A    mlbviewer-test/LICENSE.txt
A    mlbviewer-test/mlbviewer.py
A    mlbviewer-test/INSTALL
A    mlbviewer-test/setup.py
A    mlbviewer-test/MLBviewer
A    mlbviewer-test/MLBviewer/LIRC.py
A    mlbviewer-test/MLBviewer/__init__.py
A    mlbviewer-test/MLBviewer/mlbtv.py
A    mlbviewer-test/MLBviewer/config.py
A    mlbviewer-test/README
Checked out revision 60.
matthew@tango:~$

jkr

Did you create a new branch (or tag)? What's with the "mlbviewer-test"?

How do you know if you have the latest?

Code:

matthew@tango:~$ cd mlbviewer-test/
matthew@tango:~/mlbviewer-test$ ls
INSTALL  LICENSE.txt  MLBviewer  mlbviewer.py  README  setup.py  test
matthew@tango:~/mlbviewer-test$ svn up
At revision 60.
matthew@tango:~/mlbviewer-test$

From within the directory,

svn up updates your copy if there are newer revisions in the repository

svn diff to see the changes between what's in the repository and any local changes you might have made

svn log to see the commit notes

And finally, you can always browse the repository online at:

http://mlbviewer.svn.sourceforge.net...bviewer/trunk/

Each file/directory has its own Rev. so you look for the highest Rev and the Age to see how recent the revision is. Browsing the repository online also lets you see the commit log and visual diff's which are easier to read than svn diff.

If you installed the package globally, (e.g. you ran setup.py install), you'll probably need to re-install the package you just checked out (or updated.)

daftcat 04-23-2008 02:15 PM

Quote:

Originally Posted by hanophix (Post 3130574)
I don't know if I am pulling the newest svn off correctly...I am not getting anything when I press J for jumping to a day....I am still getting traceback errors. How do I know whether I am picking up the latest version?
____________________________________________________________________
Newbie error....Got it situated!

Glad to hear it.

I don't mind typing out the howto answers like I just did. It helps me later when someone asks the same question. :)

You have to have a manual first before you can tell someone to read the fine manual. :D

hanophix 04-23-2008 02:17 PM

Daftcat-
Thanks! I didn't realize it was being put into a new folder, I have been looking at .mlb from the original origin. The svn put it in a mlbviewer-test folder within my home directory...I am sure you already know this, but I didn't and that was my problem... Everything works great, I love the options!

jkr 04-23-2008 02:34 PM

Quote:

Originally Posted by daftcat (Post 3130588)

Did you create a new branch (or tag)? What's with the "mlbviewer-test"?

Nope. You can call the target directory anything you want -- I just wanted to indicate putting it somewhere other than the directory he was probably running out of right now. Sometimes if somethig got screwy with my edit, I just pull down to a different folder with an arbitrary name (mlbviewer-i-fd-up) and run it out of there to compare.

Great writeup. One slight addition:

Quote:

Originally Posted by daftcat (Post 3130588)
svn diff to see the changes between what you checked out and what's in the repository.

This actually shows the difference between what you last checked out (what was on the server) and the local changes you made to it. It doesn't show what changes have appeared on the server.

Advanced usage note: 'svn log' shows you all the changes. But you can actually pull down from any point -- svn keeps a complete history. So if any of you are real bug-hunting junkies, and you think a recent change might have screwed something up, you can just run 'svn -r #' up, where '#' is a change in the log, to roll back to here. Only for the curious, but the latest version will still always be there waiting for you if you screw up

And just to add on to what daftcat said about system installation. If that's how you run it, you can just run setup.py again. Each change will overwrite the old files.

daftcat 04-23-2008 02:37 PM

Where Are Condensed Games?
 
Copied from the MLB Mosaic Forum (and in turn, copied from an email correspondence with one of the members of that forum):

Quote:

Thank you very much for your note to Mark Newman regarding your inability to get the Condensed Games. We apologize for the delay in providing you this content, but the product is not gone forever. Its launch this year was slightly delayed due to the several unforeseen factors around Opening Day. That being said, we fully expect the product to be available in May. In the interim, I would recommend you use our new video search page and watch the Rewind Recaps. We have them for every game, every day. Thanks for your patience and we look forward to providing you with the Condensed Games as soon as possible.



Best regards,

Matthew Gould

VP, Corporate Communications

MLB Advanced Media
When Condensed Games return, I'll be sure to add that to mlbviewer. For now, I support Rewind Recaps already.

jkr 04-23-2008 02:41 PM

Daftcat-

Awesome. I love those.

daftcat 04-23-2008 03:40 PM

Splash Screen Poll
 
What do you think of this as a new splash screen?

http://www.eds.org/~straycat/mlbsplash.jpg

This is based on an older version of our VERSION text but we can change that.

Please keep in mind the splash screen is only there to serve as a buffer between the time you start the application and when the listings load. There are no additional sleep commands in the splash code. So under normal network conditions, the amount of time this screen would be displayed would be relatively short (unlike Adobe Photoshop or Gimp, for example.)

What do you think?

a) Keep it simple. I like the splash the way it is.
b) That rocks. Let's go with it.
c) I'm indifferent.

turf212 04-23-2008 03:48 PM

Quote:

Originally Posted by daftcat (Post 3130532)
I'm guessing just based on the time difference between this post and jkr's that you just missed his check-in. Try checking it out again.

I'll see if I can re-raise the Exception when debug is enabled just in case we're masking something else. Debug is intended to let most errors drop through like a lead ball so we can find the "unknown" errors.

Pulled it down on another machine and it all worked fine. May just have been timing. I'll go back and try the original.

jkr 04-23-2008 03:56 PM

Quote:

Originally Posted by daftcat (Post 3130680)
What do you think of this as a new splash screen?

http://www.eds.org/~straycat/mlbsplash.jpg

This is based on an older version of our VERSION text but we can change that.

Please keep in mind the splash screen is only there to serve as a buffer between the time you start the application and when the listings load. There are no additional sleep commands in the splash code. So under normal network conditions, the amount of time this screen would be displayed would be relatively short (unlike Adobe Photoshop or Gimp, for example.)

What do you think?

a) Keep it simple. I like the splash the way it is.
b) That rocks. Let's go with it.
c) I'm indifferent.

I would actually go for (a). Not necessarily because of personal preference (I'm pretty indifferent, as far as that goes), but because MLB is one of those entities that is *very* touchy about its brand property. And this logo possibly moreso than anything else, since it signifies their imprimatur (a real, licensed cap vs. a knockoff). Frankly, we probably shouldn't even be using 'mlb' in the program name, but I don't think that's a big deal. This, though, might actually lead to a cease and desist if we released with it.

daftcat 04-23-2008 04:29 PM

Quote:

Originally Posted by jkr (Post 3130700)
I would actually go for (a). Not necessarily because of personal preference (I'm pretty indifferent, as far as that goes), but because MLB is one of those entities that is *very* touchy about its brand property. And this logo possibly moreso than anything else, since it signifies their imprimatur (a real, licensed cap vs. a knockoff). Frankly, we probably shouldn't even be using 'mlb' in the program name, but I don't think that's a big deal. This, though, might actually lead to a cease and desist if we released with it.

Good call.

Poll closed. ;)

Wolfvorkian 04-23-2008 06:25 PM

Quote:

Originally Posted by daftcat (Post 3130680)
What do you think of this as a new splash screen?

a) Keep it simple. I like the splash the way it is.
b) That rocks. Let's go with it.
c) I'm indifferent.

How about "b". I like it plus I'd like to see if they are petty enough to whine about it. I suspect they may be, however. I wish I wasn't addicted to MLB, I gag every time I end up giving them any money.

dmandell 04-23-2008 08:26 PM

I really like the addition of the top play listings, it's great stuff.

I'm with jkr on the logo, there's no sense in doing anything to upset major league baseball. That's not to say you shouldn't add some sort of splash screen, just that it shouldn't look like a copyrighted image.

CartersAdvocate 04-24-2008 08:29 AM

Is there any way to let us make our own ASCII splash screen (and maybe put a variable somewhere to let it know where to put the version info)? That way if people wanted, they could make the MLB or their team's logo in ASCII art, but it wouldn't be officially released with it so it shouldn't attract the hounds

daftcat 04-24-2008 01:52 PM

Quote:

Originally Posted by j3ff3r (Post 3131441)
Is there any way to let us make our own ASCII splash screen (and maybe put a variable somewhere to let it know where to put the version info)? That way if people wanted, they could make the MLB or their team's logo in ASCII art, but it wouldn't be officially released with it so it shouldn't attract the hounds

Ah, now this is the beauty of open source. This sounds like a great opportunity for you to look at our splash screen code (which is all of about four lines) and decide if you want to implement your own custom splash screen (which would bloat it up to about six or eight lines.)

The biggest problem I see with implementing a user-defined splash screen is replacing whatever user-defined tag with the version string. I guess if the user wants to go through all the trouble of formatting an ascii graphic that doesn't look like a$$ when cooked through curses, then it should be up to them to also figure out where to put the version string in, how long the version string will be, and go through all the iterations of poorly formatted splash screen until they get it right.

All in all, this doesn't really sound like a feature I want to implement--a very low bang to buck ratio. Try bribing me with tickets and maybe I'll reconsider. ;-) What's your local team?

daftcat 04-24-2008 01:59 PM

I tried a knock-off of the MLB logo with a silhouetted Tux, the penguin, but it was virtually unrecognizable as a penguin and wasn't fat enough to accommodate a version string. Who wants a skinny penguin?!

I'm looking at the alarm clock feature and then I'm calling it done for this release. I probably should implement meta-refresh for "Estimated delay" pages but it might be more annoying to wait for our app to retry under network congestion conditions. Perhaps I'll just write a "mlb.com congestion" error message and call it a day.

I'd like to get a working version of mlbscores (which is behaving very badly right now) into the next release.


All times are GMT -5. The time now is 02:34 AM.