urlopen errors in script

S

Sleepy Cabbage

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:
jsfiles/NowPlayingDisplay.aspx?f=http%3A%2F%2Frope.ccap.fimc.net%2Ffeeds%
2Fnowplaying%2FGlobal%2FHeart_Network%2FHeart_East_Midlands%
2F6854.xml&l=6854&tzc=8&at=HeartEastMids').read(),'>')

this works and displays the artist and song title.

However, when I add this to my script I get the following errors:

----------------------------------------------------------------------------

superkaramba(28855) ThemesDlg::addThemeToList: addThemeToList() file: "/
home/sleepy/dev/MyTheme/
MyTheme.theme"
superkaramba(28855) Karamba::startKaramba: Loading script module:
"MyTheme.py"
superkaramba(28855) KarambaInterface::initInterpreter: Using "python"
script: "/home/sleepy/dev/MyTheme/
MyTheme.py"
Kross: "Loading the interpreter library for python"
Kross: "Successfully loaded Interpreter instance from library."
Kross:
"PythonScript::Constructor."
Kross:
"PythonScript::execute"
Kross:
"PythonInterpreter::extractException:
File "/home/sleepy/dev/MyTheme/MyTheme.py", line 4, in
<module>
#this import statement allows access to the karamba
functions

File "/home/sleepy/dev/MyTheme/MyTheme.py", line 9, in <module>
import urllib2

File "<string>", line 18, in _import

File "/usr/lib/python2.6/urllib2.py", line 92, in <module>
import httplib

File "<string>", line 18, in _import

File "/usr/lib/python2.6/httplib.py", line 1054, in <module>
import ssl

File "<string>", line 18, in _import

File "/usr/lib/python2.6/ssl.py", line 81, in <module>
class SSLSocket (socket):
"
Kross: "Error error=Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given) lineno=81 trace=
File "/home/sleepy/dev/MyTheme/MyTheme.py", line 4, in
<module>
#this import statement allows access to the karamba functions

File "/home/sleepy/dev/MyTheme/MyTheme.py", line 9, in <module>
import urllib2

File "<string>", line 18, in _import

File "/usr/lib/python2.6/urllib2.py", line 92, in <module>
import httplib

File "<string>", line 18, in _import

File "/usr/lib/python2.6/httplib.py", line 1054, in <module>
import ssl

File "<string>", line 18, in _import

File "/usr/lib/python2.6/ssl.py", line 81, in <module>
class SSLSocket (socket):
"
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/apport_python_hook.py", line 38,
in apport_excepthook
from apport.packaging_impl import impl as
packaging
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/dist-packages/apport/__init__.py", line 1, in
<module>
from apport.report import
Report
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/dist-packages/apport/report.py", line 21, in
<module>
import
fileutils
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/dist-packages/apport/fileutils.py", line 16,
in <module>
from packaging_impl import impl as
packaging
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/dist-packages/apport/packaging_impl.py", line
18, in <module>
import
apt
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/dist-packages/apt/__init__.py", line 7, in
<module>
from apt.package import
Package
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/dist-packages/apt/package.py", line 23, in
<module>
import
httplib
File "<string>", line 18, in
_import
File "/usr/lib/python2.6/httplib.py", line 1054, in
<module>
import
ssl
File "<string>", line 18, in _import
File "/usr/lib/python2.6/ssl.py", line 81, in <module>
class SSLSocket (socket):
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)

Original exception was:
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
Kross: "PythonScript::Destructor."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top