just started, some problems with traits gui (or my setup?)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

just started, some problems with traits gui (or my setup?)

Andrzej Giniewicz

just today I installed traits (with traits gui and Wx backend), using
Python 2.6.4, NumPy 1.4.0 and wxWidgets with wxPython Got traits from my OS repository (Arch Linux current, i.e.
version 3.3.0 of all 3 traits-*) - I also got other ets packages from
OS. For first experience I decided to follow "Getting Started with
Enthought 3.x Technologies" from wiki.
- I arrived to point when gui is made. Actually when I downloaded
lorenz_original2.py to see if it was because of my typing, I found out
it's not because that. So here's what's going on for me:

1) I get warnings, but this cannot be it:

[giniu@raven3 ~]$ python ./lorenz_original2.py
DeprecationWarning: PyArray_FromDims: use PyArray_SimpleNew.
  def convert_to_rgbarray(self): return
DeprecationWarning: PyArray_FromDimsAndDataAndDescr: use
  def convert_to_rgbarray(self): return

2) all numeric inputs do not react at all. I can change "output" by
drop down list and see plot change, but when I change numeric values,
nothing changes

3) when I comment out whole __init__ method I still get warnings from
1), but now I do not see plot at first.

4) when I change output by drop down list I get

Exception occurred in traits notification handler for object:
<__main__.LorenzData object at 0x33bd470>, trait: output, old value: x
vs time, new value: z vs time
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/enthought/traits/trait_notifiers.py",
line 344, in call_1
    self.handler( object )
  File "./lorenz_original2-mod.py", line 24, in _output_changed
    self.data2d = self.data3d[:,self.output_]
IndexError: invalid index

I guess because it wasn't initialized correctly? Anyway

5) I can change numerical values of fields specified by numbers but I
don't see anything, until I change output by drop-down, then I see the
difference in picture and it works nicely. The issue is though

6) When I change field that is array (Init or Time from example, 3
numbers in Array - here I changed first from 0.0 to 0.02 by only
pressing 2 at end of input), I get:

Exception occurred in traits notification handler.
Please check the log file for details.
Exception occurred in traits notification handler for object:
<__main__.LorenzData object at 0x4142470>, trait: init, old value: [
0.  1.  0.], new value: [u'0.02' u'1.0' u'0.0']
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/enthought/traits/trait_notifiers.py",
line 481, in rebind_call_0
    self.dispatch( getattr( self.object(), self.name ) )
  File "/usr/lib/python2.6/site-packages/enthought/traits/trait_notifiers.py",
line 424, in dispatch
    handler( *args )
  File "./lorenz_original2-mod.py", line 35, in calculatePoints
    self.data3d = odeint(self.lorenz, init, self.timePoints,
args=(self.prandtl, self.rayleigh, self.beta))
  File "/usr/lib/python2.6/site-packages/scipy/integrate/odepack.py",
line 144, in odeint
    ixpr, mxstep, mxhnil, mxordn, mxords)
TypeError: array cannot be safely cast to required type

so it looks like numbers gets interpreted as unicode strings, while it
doesn't happen in case of normal, single fields OR with __init__ not
commented out, when it's not commented out nothing changes and nothing
goes to log. Not a single warning or such.

I'd be glad for hints of what might be causing it and how to fix this.
Maybe traits 3.3 are too old for this version of wx and stuff? Or
maybe tutorial stuff is outdated (it's about 2 years old after all) -
if yes how it should look? If you need any more info I'd be happy to
provide all that's needed to solve/debug this case!

Thanks in advance for any help!
Enthought-Dev mailing list
[hidden email]