Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I hope you guys keep the script as simple as possible. A toggle for 400k or 800k would be okay but for my particular case, not really necessary. Most of the time 800 craps out on me, so I've seldom bother to even try the faster feeds anymore. I did call to see what the 3Mbs cost and it isn't much more, so If may upgrade but still changing a file isn't much of a problem or too much to ask.
I like simplicity, being able to either watch the games or listen to them is just fine afaic.... that is enough. Making an edit to a config file doesn't bother me any.It is none of my business really because this is your baby but I hope whatever time you guys spend in the future is used to make the existing product bullet proof... that is my druthers.
The intent is to keep the basic interface simple with very little startup knowledge necessary to get it going. However, I'd like to also have powerful tools ready at your disposal should you want to dive in deeper. For example, the listings screen will probably not undergo any more changes except perhaps place a couple visual cues for settings in your config file like [800k] to denote that your default speed is 800k. You might be able to press 'p' (I have other plans for 's') to change your speed on the fly. Of course if you never want to, you never need to.
Beyond the basic interface, I'd like to have a couple other screens you could access (but don't have to.) When highlighting the current game, maybe you could press 'i' and it would bring up a game detail screen. In that screen it would have team records, probable pitchers and their records, and perhaps news hyperlinks for the preview pages. Each game actually has a preview page on MLB for each of the home and away teams. I would like to figure out how to tell Firefox to load a page if it's running or launch it if it's not (or whatever web browser you want to use in the config file.) We could also print linescores but only when requested. I hate spoilers!
Another couple screens I am considering implementing is a scoreboard screen and a standings screen.
I'd also like to support all the video links in the listings we download from mlb.com which would include condensed games and top plays.
My intention is not to clutter anything up with overbearing interfaces and unwieldy config files but rather make power features available for people who want them and completely unused code for people who don't. That's one of the nice things with OOP. If you never press that 'i' key, we'll never pull down the miniscoreboard.xml file that has all that game info and we'll never build the objects and methods to support it in your memory. We don't make it until you order it.
Good things are coming but the basic operation will remain simple.
<HTML><HEAD>
<TITLE>Request Timeout</TITLE>
</HEAD><BODY>
<H1>Request Timeout</H1>
The server timed out while waiting for the browser's request.<P>
Reference #2.7c4a4350.1208499039.0
</BODY></HTML>
Connection closed by foreign host.
I have a super-fast internet connection, so that isn't it and I tried a few other urls instead of mlb.mlb.com and none worked either. Whazza?
I have a super-fast internet connection, so that isn't it and I tried a few other urls instead of mlb.mlb.com and none worked either. Whazza?
I don't see your GET request in the output above. You have to copy and paste the lines from GET to Cache-Control (inclusive) and press return twice at the end to denote the end of the headers and submit the request.
Am I mistaken here, but I am paying for only the 400k stream, can I still get the 800k with this script?
You can only watch the live 400k stream, but you can get the archived 800k stream. I forgot I had it at 800k and tried to watch a live stream. Comes back with an HTML error. I've since upgraded my service as the quality difference is night an day.
I don't see your GET request in the output above. You have to copy and paste the lines from GET to Cache-Control (inclusive) and press return twice at the end to denote the end of the headers and submit the request.
daftcat: Oh I see. I do get the response you posted earlier when I (do it properly and) insert the lines from GET to Cache-Control. Any other ideas? Thanks for the help.
daftcat: Oh I see. I do get the response you posted earlier when I (do it properly and) insert the lines from GET to Cache-Control. Any other ideas? Thanks for the help.
So at the core OS level, you're able to communicate with the servers. That's really weird that Python is having trouble. I'm sure you don't find that comforting that we're stumped. Let me do some Google searching and see what I can find. In the meantime, can you see if there's an update for your Python available? 2.5.1 sounds recent but maybe there's something buggy about it that I'm not aware of. Personally, I'm using 2.4.4. No, wait, I'm using 2.5.1 under Cygwin on my Windows machine. I guess that rules out the Python version.
Let me see if I can find something on Google. I'll get back to you. In the meantime, I have tested our code under Windows using Cygwin if you wanted to test that for comparison.
If you're using the code released on Monday, you highlight a game and press 'a'. It defaults to the Home team stream but you can add audio_follow=kc (or whoever your favorite team is) and if that team is playing in one of the game you're listening to, then the audio stream will select that team's audio stream. That way if you like your team's announcers, you'll always listen to them no matter if they are at home or on the road.
This is very strange. The only thing that comes to mind -- like daftcat said -- is that a bug crept into ubuntu's version of python. I'm using gutsy as well, and I'm also using python 2.5..1 and I'm not having any problems, but I also haven't kept up to date with all the updates -- looks like you have.
Still, a web search shows no reports of similar urlerrors, and so many things depend on the modules, I'm sure something would have shown up. But the problem does seem to be in python.
A few more troubleshooting questions:
1. Can you connect with other webpages through python? E.g. run the example with the python interface I gave you earlier with 'http://www.google.com' ?
2. If you run the simple example with urllib instead of urllib2, what happens? (I.e. import urllib, urllib.urlopen, and so on.)
1. Can you connect with other webpages through python? E.g. run the example with the python interface I gave you earlier with 'http://www.google.com' ?
2. If you run the simple example with urllib instead of urllib2, what happens? (I.e. import urllib, urllib.urlopen, and so on.)
jkr
Hmmm. This is what I get for your 1 and 2 above. You'll notice google.com yields the exact same errors as in my post 459, and urllib just gives errors on different lines. Still no luck. Should I try uninstalling and reinstalling python? Thanks for your help.
Quote:
brent@pathless:~$ python
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> URL = "http://google.com"
>>> fp = urllib2.urlopen(URL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
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 1107, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.5/urllib2.py", line 1082, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (-2, 'Name or service not known')>
>>>
brent@pathless:~$ python
Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> URL = "http://google.com"
>>> fp = urllib.urlopen(URL)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/urllib.py", line 82, in urlopen
return opener.open(url)
File "/usr/lib/python2.5/urllib.py", line 190, in open
return getattr(self, name)(url)
File "/usr/lib/python2.5/urllib.py", line 325, in open_http
h.endheaders()
File "/usr/lib/python2.5/httplib.py", line 856, in endheaders
self._send_output()
File "/usr/lib/python2.5/httplib.py", line 728, in _send_output
self.send(msg)
File "/usr/lib/python2.5/httplib.py", line 695, in send
self.connect()
File "/usr/lib/python2.5/httplib.py", line 663, in connect
socket.SOCK_STREAM):
IOError: [Errno socket error] (-2, 'Name or service not known')
That's what I would recommend. All the Google posts I've seen so far that refer to your error are in regards to proxy servers but you proved via telnet that you're not using a proxy. Try re-installing Python. I'm crossing my fingers for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.