Open bluewin4 opened 3 years ago
Update: I closed orange and opened it again and the color widget no longer borks my data but the colours I selected all got reset to generic in all of my color widgets. Of note, when I closed Orange, it generated an error, I had to rejigger which data sets were included to get the error again though
Exception: | AttributeError: Can't pickle local object 'bind_variable.<locals>.cast' |
---|---|
Module: | orangewidget.settings:774 |
Widget Name: | Color |
Widget Module: | Orange.widgets.data.owcolor:1149 |
Version: | 3.30.0.dev |
Environment: | Python 3.8.8 on Windows 10 10.0.18362 AMD64 |
Installed Packages: | AnyQt==0.0.13, Bottleneck==1.3.2, CacheControl==0.12.6, Genesis-PyAPI==1.2.1, Orange-Spectroscopy==0.5.8, Orange3-Associate==1.1.8, Orange3-Bioinformatics==4.3.1, Orange3-Educational==0.4.0, Orange3-Explain==0.3.0, Orange3-Network==1.5.1, Orange3-Survival-Analysis==0.2.0, Orange3-Timeseries==0.3.10, Orange3==3.30.0.dev0+f7fd0a7, Pillow==8.1.2, PyQt5-sip==4.19.18, PyQt5==5.12.3, PyQtChart==5.12, PyQtWebEngine==5.12.1, PySocks==1.7.1, PyYAML==5.4.1, XlsxWriter==1.3.7, asteval==0.9.23, astor==0.8.1, autograd-gamma==0.5.0, autograd==1.3, baycomp==1.0.2, beautifulsoup4==4.9.3, brotlipy==0.7.0, catboost==0.24.4, certifi==2020.12.5, cffi==1.14.5, chardet==4.0.0, colorcet==2.0.6, commonmark==0.9.1, cryptography==3.4.6, cycler==0.10.0, decorator==4.4.2, dictdiffer==0.8.0, docutils==0.16, et-xmlfile==1.0.1, extranormal3==0.0.3, formulaic==0.2.3, future==0.18.2, h11==0.12.0, h2==4.0.0, h5py==3.2.1, hpack==4.0.0, httpcore==0.12.3, httpx==0.16.1, hyperframe==6.0.0, idna==2.10, importlib-metadata==4.0.1, interface-meta==1.2.3, itsdangerous==1.1.0, jdcal==1.4.1, joblib==1.0.1, keyring==22.3.0, keyrings.alt==4.0.2, kiwisolver==1.3.1, lifelines==0.25.11, llvmlite==0.36.0, lmfit==1.0.2, lockfile==0.12.2, lxml==4.6.3, matplotlib==3.3.4, more-itertools==8.7.0, msgpack==1.0.2, networkx==2.5, numba==0.53.1, numpy==1.20.2, olefile==0.46, openTSNE==0.6.0, openpyxl==3.0.7, orange-canvas-core==0.1.21, orange-widget-base==4.13.1, pandas-datareader==0.9.0, pandas==1.2.3, param==1.10.1, patsy==0.5.1, pip==21.0.1, point-annotator==2.0.0, pyOpenSSL==20.0.1, pyclipper==1.2.1, pycparser==2.20, pyct==0.4.8, pyparsing==2.4.7, pyqtgraph==0.12.1, python-dateutil==2.8.1, python-louvain==0.15, pytz==2021.1, pywin32-ctypes==0.2.0, qasync==0.13.0, renishawWiRE==0.1.14, requests-cache==0.6.3, requests==2.25.1, resdk==13.1.0, rfc3986==1.4.0, scikit-learn==0.23.2, scipy==1.5.3, serverfiles==0.3.0, setuptools==49.6.0.post20210108, shap==0.37.0, six==1.15.0, slicer==0.0.3, slumber==0.7.1, sniffio==1.2.0, soupsieve==2.2.1, spectral==0.22.2, statsmodels==0.12.2, threadpoolctl==2.1.0, tornado==6.1, tqdm==4.60.0, typing-extensions==3.10.0.0, tzlocal==2.1, uncertainties==3.1.5, url-normalize==1.4.3, urllib3==1.26.3, wheel==0.36.2, win-inet-pton==1.1.0, wincertstore==0.2, wrapt==1.12.1, xlrd==2.0.1, zipp==3.4.1 |
Machine ID: | 28a35e85-dec8-4cd4-b940-6519b257496e |
Stack Trace: | Traceback (most recent call last): File "C:\Program Files\Orange\lib\site-packages\orangewidget\workflow\widgetsscheme.py", line 512, in eventFilter widget.saveSettings() File "C:\Program Files\Orange\lib\site-packages\orangewidget\widget.py", line 1149, in saveSettings self.settingsHandler.update_defaults(self) File "C:\Program Files\Orange\lib\site-packages\orangewidget\settings.py", line 813, in update_defaults self.write_defaults() File "C:\Program Files\Orange\lib\site-packages\orangewidget\settings.py", line 530, in write_defaults self.write_defaults_file(settings_file) File "C:\Program Files\Orange\lib\site-packages\orangewidget\settings.py", line 774, in write_defaults_file pickle.dump([add_version(context) for context in self.global_contexts],AttributeError: Can't pickle local object 'bind_variable.<locals>.cast' |
Local Variables: | OrderedDict([('class', <class 'orangewidget.settings.ContextHandler'>), ('add_version', <function ContextHandler.write_defaults_file.<locals>.add_version at 0x00000281487ABCA0>), ('self', <Orange.widgets.settings.PerfectDomainContextHandler object at 0x000002813980D490>), ('settings_file', <_io.BufferedWriter name='C:/Users/artim/AppData/Local\Orange\3.30.0.dev\widgets\Orange.widgets.data.owcolor.OWColor.pickle'>)]) |
Update: I figured out a new way to break it, when changing the names of different variables in the color widget interface just keep pressing tab too many times and it will throw an error and then prevents the variables with color selection and name addition from being used in a plot
Note the problem with the appearing on plot only seems to occur if the names are all changed via the color widget
Traceback (most recent call last): File "c:\users\artim\onedrive\documents\orange\orange3\Orange\widgets\data\owcolor.py", line 330, in setData desc.set_value(col - 1, value) File "c:\users\artim\onedrive\documents\orange\orange3\Orange\widgets\data\owcolor.py", line 118, in set_value self.new_values[i] = value IndexError: list assignment index out of range
Thanks for finding new ways to break Orange. :) Your first problem seems especially interesting. I suspect something is not OK with how settings get handled.
We really appreciate that you attach workflows and data so that we can reproduce the problem quickly. Next time, if you have time, you could perhaps try to make the smallest workflow/dataset combination that can still reproduce the issue. Also, if you are openning data with Multifile, you can also save (Save Data) as a single file and then reproduce the problem with that file.
So I have a workflow with a bunch of spectra going through it and I set it up so that it would colour them nice and pretty, but I wanted to see how a previous data set looked in the same format. Suddenly all of the datasets were the exact same numeric values.
If I remove the color widget I can replot things just fine with either the old or new data. But then I don't have the plot colours I wanted.
[ ] How can we reproduce the problem?
bug.zip Just load the data in and i set it up to show how the colour widget causes this duplication both graphically in some line plots but also in data tables. If you break the connection between the multi-file widget and the rest and then remake it, the color widget will break the data.
[ ] What's your environment?
Operating system: Windows 10
Orange version: 3.30.0.dev
How you installed Orange: Command line