IPython Console plugin incompatible with ipython 0.13

Bug #1066831 reported by Rocco Aliberti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Low
Dustin Spicuzza

Bug Description

Trying to enable IPython Console plugin with installed ipython 0.13 i get this:

ERROR : could not find a compatible version of IPython
Traceback (most recent call last):
  File "/home/***/exaile/plugins/ipconsole/ipython_view/__init__.py", line 32, in <module>
    raise ImportError('unknown IPython version: {0}'.format(version))
ImportError: unknown IPython version: 0.13
Traceback (most recent call last):
  File "/home/***/exaile/xl/plugins.py", line 122, in enable_plugin
    plugin = self.load_plugin(pluginname)
  File "/home/***/exaile/xl/plugins.py", line 84, in load_plugin
    plugin = imp.load_source(pluginname, os.path.join(path,'__init__.py'))
  File "/home/***/exaile/plugins/ipconsole/__init__.py", line 67, in <module>
    class IPView(ip.IPythonView):
AttributeError: 'module' object has no attribute 'IPythonView'
WARNING : Unable to enable plugin ipconsole

Changed in exaile:
milestone: none → 3.4.0
Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

That was a silly bug. I've fixed it in trunk at r4416. Sorry for taking so long.

Changed in exaile:
importance: Undecided → Low
status: New → Fix Committed
assignee: nobody → Dustin Spicuzza (dustin-virtualroadside)
Revision history for this message
Rocco Aliberti (eri.trabiccolo) wrote :

Thanks and don't worry for the delay, the only one problem is that I just installed ipython 1.0.0 and I ran into this:

Traceback (most recent call last):
  File "/home/rock/exaile/plugins/ipconsole/__init__.py", line 157, in <lambda>
    callback=lambda *x: show_console(exaile))
  File "/home/rock/exaile/plugins/ipconsole/__init__.py", line 218, in show_console
    PLUGIN = IPyConsole({'exaile': exaile})
  File "/home/rock/exaile/plugins/ipconsole/__init__.py", line 93, in __init__
    ipv = IPView()
  File "/home/rock/exaile/plugins/ipconsole/ipython_view/ipython_view2.py", line 539, in __init__
    input_func=self.raw_input)
  File "/home/rock/exaile/plugins/ipconsole/ipython_view/ipython_view2.py", line 80, in __init__
    IPython.frontend.terminal.interactiveshell.raw_input_original = input_func
AttributeError: 'module' object has no attribute 'frontend'

I made the attached patch against trunk r4117, but don't know if you'll like the solution adopted :).

Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

Your patch looks like the approach I would take, except I'd probably check for a specific exception type instead of 'Exception'. Or, even use hasattr() to determine which attribute to use.

I'll try this out tomorrow.

Revision history for this message
Rocco Aliberti (eri.trabiccolo) wrote :

Yep, you're right.

Revision history for this message
Dustin Spicuzza (dustin-virtualroadside) wrote :

Fixes for IPython 1.x and 2.x committed to trunk.

Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.