Ipython raises an error when importing tables (pytables)

Bug #249036 reported by David Huard
2
Affects Status Importance Assigned to Milestone
IPython
Invalid
Undecided
Fernando Perez

Bug Description

I can import `tables` fine with the python shell, but the ipython shell raises this error:

>>> import tables
ImportError Traceback (most recent call last)

/aos/home/huardda/<ipython console> in <module>()

/usr/local/lib/python2.5/site-packages/rpdb2.pyc in rpdb2_import_wrapper(*args, **kwargs)
  12442 # an import statement.
  12443 #
> 12444 m = g_import(*args, **kwargs)
  12445
  12446 if name == 'gtk':

/usr/local/lib64/python2.5/site-packages/tables/__init__.pyc in <module>()
     74 # Import the user classes from the proper modules
     75 from tables.exceptions import *
---> 76 from tables.file import File, openFile, copyFile
     77 from tables.node import Node
     78 from tables.group import Group

/usr/local/lib/python2.5/site-packages/rpdb2.pyc in rpdb2_import_wrapper(*args, **kwargs)
  12442 # an import statement.
  12443 #
> 12444 m = g_import(*args, **kwargs)
  12445
  12446 if name == 'gtk':

/usr/local/lib64/python2.5/site-packages/tables/file.py in <module>()
     42
     43 import tables.misc.proxydict
---> 44 from tables import hdf5Extension
     45 from tables import utilsExtension
     46 from tables.parameters import \

/usr/local/lib/python2.5/site-packages/rpdb2.pyc in rpdb2_import_wrapper(*args, **kwargs)
  12434
  12435 if name in sys.modules:
> 12436 return g_import(*args, **kwargs)
  12437
  12438 #

/aos/home/huardda/hdf5Extension.pyx in hdf5Extension()

/usr/local/lib/python2.5/site-packages/rpdb2.pyc in rpdb2_import_wrapper(*args, **kwargs)
  12442 # an import statement.
  12443 #
> 12444 m = g_import(*args, **kwargs)
  12445
  12446 if name == 'gtk':

ImportError: No module named utilsExtension

> [2]: debug
> /usr/local/lib/python2.5/site-packages/rpdb2.py(12444)rpdb2_import_wrapper()
  12443 #
> 12444 m = g_import(*args, **kwargs)
  12445

ipdb> name
'utilsExtension'
ipdb> name in sys.modules
False
ipdb> up
> /usr/local/lib/python2.5/site-packages/rpdb2.py(12436)rpdb2_import_wrapper()
  12435 if name in sys.modules:
> 12436 return g_import(*args, **kwargs)
  12437

ipdb> name in sys.modules
False
ipdb> name
'tables'
ipdb>

This looks like a circular reference but i'm no expert.
tables is from a recent svn checkout. ipython is from the launchpad repo and the operating system is fedora8.

Thanks, don't hesitate to contact me for further details or testing.

Cheers,

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote : Re: [Bug 249036] [NEW] Ipython raises an error when importing tables (pytables)

On Wed, Jul 16, 2008 at 01:11:55PM -0000, David Huard wrote:
> /usr/local/lib/python2.5/site-packages/rpdb2.pyc in rpdb2_import_wrapper(*args, **kwargs)
> 12442 # an import statement.
> 12443 #
> > 12444 m = g_import(*args, **kwargs)
> 12445
> 12446 if name == 'gtk':

> ImportError: No module named utilsExtension

Can you tell us how you installed ipython and pytable (the exact command
lines used to run the setup.py) and the respective paths they are
installed to (ie the module.__file__ for each of them).

I suspect a setuptools induced problem.

Cheers,

Gaël

Revision history for this message
David Huard (david-huard) wrote : Re: [Bug 249036] [NEW] Ipython raises an error when importing tables (pytables)
Download full text (93.5 KiB)

Salut Gael,

voici les commandes et l'output. J'ai effacé les répertoires IPython/ et
tables/ dans /usr/local/lib et /usr/local/lib64 respectivement.

Merci de regarder ça !

David

huardda@angus:~/repos/pytables$ python setup.py install
* Found numpy 1.1.1.dev5418 package installed.
* Found HDF5 headers at ``/usr/include``, library at ``/usr/lib64``.
* Found LZO 2 headers at ``/usr/include``, library at ``/usr/lib64``.
* Skipping detection of LZO 1 since LZO 2 has already been found.
* Found bzip2 headers at ``/usr/include``, library at ``/usr/lib64``.
running install
running build
running build_py
running build_ext
running build_scripts
running install_lib
creating /usr/local/lib64/python2.5/site-packages/tables
copying build/lib.linux-x86_64-2.5/tables/registry.py ->
/usr/local/lib64/python2.5/site-packages/tables
copying build/lib.linux-x86_64-2.5/tables/conditions.py ->
/usr/local/lib64/python2.5/site-packages/tables
copying build/lib.linux-x86_64-2.5/tables/_comp_lzo.so ->
/usr/local/lib64/python2.5/site-packages/tables
creating /usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_Numeric.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/Tables_lzo1.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/Tables_lzo2.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_tablesMD.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/smpl_i32be.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/zerodim-attrs-1.4.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/smpl_f64le.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_tables.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_tree.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_backcompat.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/smpl_i64be.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/smpl_SDSextendible.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_queries.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/time-table-vlarray-1_x.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_earray.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/test_garbage.py ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_64-2.5/tables/tests/smpl_f64be.h5 ->
/usr/local/lib64/python2.5/site-packages/tables/tests
copying build/lib.linux-x86_...

Revision history for this message
David Huard (david-huard) wrote :

Hi,

I dug deeper and found that the problem disappears when I winpdb is deactivated. That is, I commented
#import ipy_winpdb
in ipy_user_conf.py and now everything works fine.

HTH,

David

Revision history for this message
Fernando Perez (fdo.perez) wrote :

I'm closing as invalid because I don't see the problem here either, even after activating winpdb. Please reopen if you find further information.

Changed in ipython:
assignee: nobody → fdo.perez
status: New → Invalid
Revision history for this message
Fernando Perez (fdo.perez) wrote :

Oops, sorry: I *do* see the problem when I activate winpdb, but the bug is in winpdb, not ipython, as can be seen from a plain python session:

>>> import winpdb
>>> import tables
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/var/lib/python-support/python2.5/rpdb2.py", line 13287, in rpdb2_import_wrapper

So this should stay closed for ipython, feel free to report it for winpdb.

Revision history for this message
David Huard (david-huard) wrote : Re: [Bug 249036] Re: Ipython raises an error when importing tables (pytables)

On Sat, Mar 14, 2009 at 8:34 AM, Fernando Perez <email address hidden>wrote:

> Oops, sorry: I *do* see the problem when I activate winpdb, but the bug
> is in winpdb, not ipython, as can be seen from a plain python session:
>

That's fine, but maybe it's worth putting a note somewhere in the docs about
this.

cheers,

David

>
> >>> import winpdb
> >>> import tables
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/var/lib/python-support/python2.5/rpdb2.py", line 13287, in
> rpdb2_import_wrapper
>
> So this should stay closed for ipython, feel free to report it for
> winpdb.
>
> --
> Ipython raises an error when importing tables (pytables)
> https://bugs.launchpad.net/bugs/249036
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Fernando Perez (fdo.perez) wrote :
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.