[SciPy-dev] problem: xplt.imagesc from wxPython

Pearu Peterson pearu at cens.ioc.ee
Wed Apr 23 12:38:01 EDT 2003


On Tue, 22 Apr 2003, Kasper Souren wrote:

> I decided to start trying some stuff with wxPython. And I really like it. And 
> because chaco can't handle imagesc'es yet, I wanted to do them with 
> scipy.xplt. But this is what I got:
> 
> """
> Traceback (most recent call last):
>   File "./wxStructures.py", line 27, in OnSelChanged
>     xplt.imagesc_cb(self.object.feature_vectors)
>   File "/usr/lib/python2.2/site-packages/scipy_base/ppimport.py", line 211, in 
> __getattr__
>     module = self._ppimport_importer()
>   File "/usr/lib/python2.2/site-packages/scipy_base/ppimport.py", line 190, in 
> _ppimport_importer
>     module = __import__(name,None,None,['*'])
>   File "/usr/lib/python2.2/site-packages/scipy/xplt/__init__.py", line 47, in 
> ?
>     from Mplot import *
>   File "/usr/lib/python2.2/site-packages/scipy/xplt/Mplot.py", line 46, in ?
>     _user_path = _getdir()
>   File "/usr/lib/python2.2/site-packages/scipy/xplt/Mplot.py", line 41, in 
> _getdir
>     if not weave.catalog.is_writable(path):
>   File "/usr/lib/python2.2/site-packages/scipy_base/ppimport.py", line 212, in 
> __getattr__
>     return getattr(module, name)
> AttributeError: 'module' object has no attribute 'catalog'
> """
> 
> Then I tried to localize the problem and I ran into another issue that's 
> probably related to the one above: the imagesc window pops up, but nothing is 
> shown inside. The little script can be found at [1].

When I ran the script [1] from a python prompt or using 'python -i' then
a huge button pops up with label "do imagesc thingy!". Pressing it opens
another window that is blank. When I close the button window, the 
"imagesc thingy" is finally displayed.

Considering the above behaviour I don't think that the two problems are
related.

Could you provide a simple example that demonstrates only the first
problem?

Also try importing weave *before* importing scipy. This will
avoid ppimport hooks for weave and might solve the first problem.

Pearu




More information about the SciPy-Dev mailing list