urlopen errors in script
__peter__ at web.de
Tue Aug 18 13:21:59 CEST 2009
Sleepy Cabbage wrote:
> I'm scripting a superkaramba theme using python and have intgrated output
> from amarok. I have also would like to show the artist and song title from
> a radio stream i've added to my playlist.
> If I open a python console and add the following:
> ">>>import urllib2"
> ">>>from urllib2 import urlopen"
> ">>>nowplaying = str.split(urlopen('http://www.hearteastmids.co.uk//
> ">>>print test[:-3]"
> this works and displays the artist and song title.
> However, when I add this to my script I get the following errors:
Please give a minimal version of your script that produces the error, not
some arbitrary excerpt that you ran successfully on the command line.
If I were to guess: you are doing something like
socket.socket = socket
somewhere, thus confusing the socket class with the module of the same name.
More information about the Python-list