Error when using plot(): "UnboundLocalError: local variable 'x_sort_order' referenced before assignment"

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

Error when using plot(): "UnboundLocalError: local variable 'x_sort_order' referenced before assignment"

Droge, Stefan

Hello, I get an error when using the plot command (see example code at the bottom.):

Even the examples that are provided with ETS throw this error (i.e. shell/lines.py).

I tried it using the chaco version provided with pythonxy 2.7.5.0 (Enthought Tool Suite 4.3.0-2) as well as the version that is included in the most recent Enthought Canopy.

Googling the error only lead me to the usual UnboundLocalError threads which were not really helpful in that case.

 

Thanks for your help!

Stefan

 

>>> from enthought.chaco.shell import *

>>> plot((0,1,2),(3,2,1))

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "C:\Python27\lib\site-packages\chaco\shell\commands.py", line 309, in plot

   *data, **kwargs)

  File "C:\Python27\lib\site-packages\chaco\shell\plot_maker.py", line 296, in do_plot

    x_ds.sort_order = x_sort_order

UnboundLocalError: local variable 'x_sort_order' referenced before assignment


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

Re: Error when using plot(): "UnboundLocalError: local variable 'x_sort_order' referenced before assignment"

alistairmethanee
This post has NOT been accepted by the mailing list yet.
it's october 2013 and the same problem seems to continue in current releases through both canopy and anaconda, and having tried many things i also don't know how to fix it. other than just replacing the error line with:

break

which just mimics throwing the error without the annoying message.
i didn't notice any side effects, yet.