[mayavi] scatter_plot.py issue...

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[mayavi] scatter_plot.py issue...

fred-2
Hi all,

When I try to run scatter_plot.py, I get this:

marsu[pts/9]:...mayavi/advanced_visualization/{34}/> python scatter_plot.py
Traceback (most recent call last):
   File "scatter_plot.py", line 33, in <module>
     from enthought.mayavi.scripts import mayavi2
   File
"/usr/local/lib/python2.5/site-packages/Mayavi-3.3.2.dev_r25465-py2.5-linux-x86_64.egg/enthought/mayavi/scripts/mayavi2.py",
line 464, in <module>
     wxversion.ensureMinimal('2.8')
   File "/usr/lib/python2.5/site-packages/wxversion.py", line 181, in
ensureMinimal
     raise AlreadyImportedError("wxversion.ensureMinimal() must be
called before wxPython is imported")
wxversion.AlreadyImportedError: wxversion.ensureMinimal() must be called
before wxPython is imported

The same for polydata.py, but glyph.py, contour.py work fine.


Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] scatter_plot.py issue...

Gael Varoquaux
On Mon, Apr 12, 2010 at 10:51:22AM +0200, Fred wrote:
> When I try to run scatter_plot.py, I get this:

> marsu[pts/9]:...mayavi/advanced_visualization/{34}/> python scatter_plot.py
> Traceback (most recent call last):
>    File "scatter_plot.py", line 33, in <module>
>      from enthought.mayavi.scripts import mayavi2
>    File
> "/usr/local/lib/python2.5/site-packages/Mayavi-3.3.2.dev_r25465-py2.5-linux-x86_64.egg/enthought/mayavi/scripts/mayavi2.py",
> line 464, in <module>
>      wxversion.ensureMinimal('2.8')
>    File "/usr/lib/python2.5/site-packages/wxversion.py", line 181, in
> ensureMinimal
>      raise AlreadyImportedError("wxversion.ensureMinimal() must be
> called before wxPython is imported")
> wxversion.AlreadyImportedError: wxversion.ensureMinimal() must be called
> before wxPython is imported

OK, that's because of a change I did last night to enforce that wx 2.8 or
bigger is used (because 2.6 simply doesn't work anymore with the color
traits).

To help me debug, can you tell me (by inserting print statements) what
the version of the imported wxPythin is before the traceback.

Cheers,

Gaël


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] scatter_plot.py issue...

fred-2
Le 12/04/2010 11:00, Gael Varoquaux a écrit :
>
> OK, that's because of a change I did last night to enforce that wx 2.8 or
> bigger is used (because 2.6 simply doesn't work anymore with the color
> traits).
>
> To help me debug, can you tell me (by inserting print statements) what
> the version of the imported wxPythin is before the traceback.
Not sure I get you here :-/

Something like:

try:
     # Try forcing the use of wx 2.8
     from enthought.etsconfig.api import ETSConfig
     if ETSConfig.toolkit in ('wx', ''):
         import wxversion
         import wx
         print wx.__version__
         wxversion.ensureMinimal('2.8')
except ImportError:
     """ wxversion not installed """

?


2.8.10.1 is installed.



Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] scatter_plot.py issue...

Gael Varoquaux
On Mon, Apr 12, 2010 at 11:40:45AM +0200, Fred wrote:
> Le 12/04/2010 11:00, Gael Varoquaux a écrit :

> > OK, that's because of a change I did last night to enforce that wx 2.8 or
> > bigger is used (because 2.6 simply doesn't work anymore with the color
> > traits).

> > To help me debug, can you tell me (by inserting print statements) what
> > the version of the imported wxPythin is before the traceback.
> Not sure I get you here :-/

> Something like:

> try:
>      # Try forcing the use of wx 2.8
>      from enthought.etsconfig.api import ETSConfig
>      if ETSConfig.toolkit in ('wx', ''):
>          import wxversion
>          import wx
>          print wx.__version__
>          wxversion.ensureMinimal('2.8')
> except ImportError:
>      """ wxversion not installed """

> ?


> 2.8.10.1 is installed.

Bug what is it that gets imported? (that a different question).

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] scatter_plot.py issue...

fred-2
Le 12/04/2010 12:12, Gael Varoquaux a écrit :

>> 2.8.10.1 is installed.
>
> Bug what is it that gets imported? (that a different question).
snippet above answsers the same thing...

Does it answer your question?


Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] scatter_plot.py issue...

Gael Varoquaux
On Mon, Apr 12, 2010 at 02:18:05PM +0200, Fred wrote:
> Le 12/04/2010 12:12, Gael Varoquaux a écrit :

> >> 2.8.10.1 is installed.

> > Bug what is it that gets imported? (that a different question).
> snippet above answsers the same thing...

Should be fixed by now. Tell me if its not.

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [mayavi] scatter_plot.py issue...

fred-2
Le 13/04/2010 22:26, Gael Varoquaux a écrit :

> Should be fixed by now. Tell me if its not.
It is :-)

Thanks!


Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev