Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting IdleX AttributeError

Tags:

python

Running Python 2.7.3 on Ubuntu 12.04, with latest versions of IPython installed. I installed IdleX but as soon as I run it, I get the error:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/idlexlib/extensionManager.py", line 131, in load_extension
    mod = importlib.import_module('.' + fullname, package=__package__)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/idlexlib/extensions/IPyIDLE.py", line 253, in <module>
    class IdleXSubSocketChannel(SimpleChannel, channels.IOPubChannel):
AttributeError: 'module' object has no attribute 'IOPubChannel'
could not load IPyIDLE

At first I thought I could ignore it as everything seemed to work fine anyway, but then I tried out a few scripts that caused errors in IdleX, but not in the regular idle. Specifically, from selenium import webdriver worked fine in regular idle but not in IdleX. Can't figure out what I'm doing wrong and what to do about it...

like image 686
Benjamin Lindqvist Avatar asked Nov 10 '22 19:11

Benjamin Lindqvist


1 Answers

After a mild search, I found out that the problem was caused by the latest release of IPython, which removed the required "channels" package.

You'll need to first uninstall your version of IPython. This is easily done by issuing the command:

$ pip uninstall ipython

After you accepted and uninstalled, you'll then need to install an older, specific version of IPython. I used 2.4 and it worked like a charm.

$ pip install -Iv ipython==2.4.0

There are probably ways to get around uninstalling and reinstalling, but that did it for me. No more problems with IdleX.

like image 138
Raphaël Côté Avatar answered Dec 12 '22 08:12

Raphaël Côté