Problems with VeSPA DataSim and Analysis

Hi everyone,
I’ve recently installed VeSPA and currently I’m running into some issues with using DataSim and Analysis. Both Pulse and Simulation work at the present moment, but whenever I attempt to import a previously created Experiment from Simulation into DataSim, I receive the following error:

Traceback (most recent call last):
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\Lib\site-packages\vespa\datasim\main.py", line 114, in on_new
    self.notebook_datasims.add_datasim_tab(datasim=datasim)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\notebook_datasim.py", line 113, in add_datasim_tab
    tab = tab_datasim.TabDatasim(self, self.top, datasim)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\tab_datasim.py", line 96, in __init__
    self.populate_controls()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\tab_datasim.py", line 197, in populate_controls
    dataset=ds)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\plot_panel_datasim.py", line 18, in __init__
    plot_panel_spectrum.PlotPanelSpectrum.__init__( self, parent, **kwargs )
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 376, in __init__
    self.update(set_scale=True)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 680, in update
    self.update_plots()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 763, in update_plots
    axes.lines = []
AttributeError: can't set attribute
Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\exception_handler.py", line 138, in exception_hook
    lines += ["*%s\t%s" % line for line in _debug_report()]
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\exception_handler.py", line 187, in _debug_report
    lines += _get_version_info()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\exception_handler.py", line 279, in _get_version_info
    head, tail = os.path.split(module.__file__)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Original exception was:
Traceback (most recent call last):
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\Lib\site-packages\vespa\datasim\main.py", line 114, in on_new
    self.notebook_datasims.add_datasim_tab(datasim=datasim)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\notebook_datasim.py", line 113, in add_datasim_tab
    tab = tab_datasim.TabDatasim(self, self.top, datasim)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\tab_datasim.py", line 96, in __init__
    self.populate_controls()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\tab_datasim.py", line 197, in populate_controls
    dataset=ds)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\datasim\plot_panel_datasim.py", line 18, in __init__
    plot_panel_spectrum.PlotPanelSpectrum.__init__( self, parent, **kwargs )
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 376, in __init__
    self.update(set_scale=True)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 680, in update
    self.update_plots()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 763, in update_plots
    axes.lines = []
AttributeError: can't set attribute

Furthermore, when trying to run Analysis on a Philips .spar file I receive a shorter yet similar error:

Traceback (most recent call last):
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\Lib\site-packages\vespa\analysis\main.py", line 232, in on_import_user_item
    self._import_file(reader(), ini_name)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\Lib\site-packages\vespa\analysis\main.py", line 534, in _import_file
    self.notebook_datasets.add_dataset_tab(datasets)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\notebook_datasets.py", line 246, in add_dataset_tab
    dtab = tab_dataset.TabDataset(self, self.top, name)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_dataset.py", line 80, in __init__
    self.populate_controls()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_dataset.py", line 149, in populate_controls
    tab = tab_spectral.TabSpectral(self, self.top, block)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_spectral.py", line 286, in __init__
    self.initialize_controls()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_spectral.py", line 471, in initialize_controls
    dataset=self.dataset,
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\plot_panel_spectral.py", line 26, in __init__
    super().__init__(parent, **kwargs)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 376, in __init__
    self.update(set_scale=True)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 680, in update
    self.update_plots()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 763, in update_plots
    axes.lines = []
AttributeError: can't set attribute
Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\exception_handler.py", line 138, in exception_hook
    lines += ["*%s\t%s" % line for line in _debug_report()]
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\exception_handler.py", line 187, in _debug_report
    lines += _get_version_info()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\exception_handler.py", line 279, in _get_version_info
    head, tail = os.path.split(module.__file__)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Original exception was:
Traceback (most recent call last):
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\Lib\site-packages\vespa\analysis\main.py", line 232, in on_import_user_item
    self._import_file(reader(), ini_name)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\Lib\site-packages\vespa\analysis\main.py", line 534, in _import_file
    self.notebook_datasets.add_dataset_tab(datasets)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\notebook_datasets.py", line 246, in add_dataset_tab
    dtab = tab_dataset.TabDataset(self, self.top, name)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_dataset.py", line 80, in __init__
    self.populate_controls()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_dataset.py", line 149, in populate_controls
    tab = tab_spectral.TabSpectral(self, self.top, block)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_spectral.py", line 286, in __init__
    self.initialize_controls()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\tab_spectral.py", line 471, in initialize_controls
    dataset=self.dataset,
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\analysis\plot_panel_spectral.py", line 26, in __init__
    super().__init__(parent, **kwargs)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 376, in __init__
    self.update(set_scale=True)
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 680, in update
    self.update_plots()
  File "C:\Users\warrenboschen\Miniconda3\envs\python37\lib\site-packages\vespa\common\wx_gravy\plot_panel_spectrum.py", line 763, in update_plots
    axes.lines = []
AttributeError: can't set attribute

Does anyone have any advice on how to resolve this issue? I’ve checked the listed file (plot_panel_spectrum.py) and nothing seems to be out of the ordinary.

Thank you in advance!
-Warren

Hi Warren,

What OS, Python version etc. are you on?

Thanks,

Brian.

OK, never mind. It I bothered to look it seems like Windows (10?) and Python 3.7?

But, usually when Vespa crashes it catches the error and pops up an error dialog with a lot of additional info in it that can help me diagnose other basic questions. Did that pop up and give you the option to copy the text output to the clipboard? If so, can you send that to me or put it in the thread, please.

My next step is to try to recreate the error. I can not do that on my Win 10 dev machine. DataSim works fine loading the “Example One-Pulse” Experiment. So, maybe you are using a newer version of matplotlib than I am? If you can tell me what packages you have installed in your ‘python37’ env, I can continue to try to troubleshoot.

thanks,

Brian.

Vespa was installed on Windows 10 and in a Python 3.7 environment with Miniconda3. Neither DataSim nor Analysis outright crash - the window becomes white and is unresponsive but a crash report is never generated.

Here’s a list of packages that have been installed within the ‘python37’ env:

asteval 0.9.23 pyhd8ed1ab_0 conda-forge
blas 1.0 mkl
brotli 1.0.9 ha925a31_2
ca-certificates 2021.10.8 h5b45459_0 conda-forge
certifi 2021.10.8 py37h03978a9_1 conda-forge
configobj 5.0.6 py37haa95532_1
cycler 0.11.0 pyhd3eb1b0_0
fonttools 4.25.0 pyhd3eb1b0_0
freetype 2.10.4 hd328e21_0
future 0.18.2 py37h03978a9_4 conda-forge
icc_rt 2019.0.0 h0cc432a_1
icu 58.2 ha925a31_3
intel-openmp 2021.4.0 haa95532_3556
jpeg 9d h2bbff1b_0
kiwisolver 1.3.1 py37hd77b12b_0
libpng 1.6.37 h2a8f88b_0
libtiff 4.2.0 hd0e1b90_0
libwebp 1.2.0 h2bbff1b_0
lmfit 1.0.3 pyhd8ed1ab_0 conda-forge
lz4-c 1.9.3 h2bbff1b_1
matplotlib 3.5.0 py37haa95532_0
matplotlib-base 3.5.0 py37h6214cd6_0
mkl 2021.4.0 haa95532_640
mkl-service 2.4.0 py37h2bbff1b_0
mkl_fft 1.3.1 py37h277e83a_0
mkl_random 1.2.2 py37hf11a4ad_0
munkres 1.1.4 py_0
numpy 1.21.2 py37hfca59bb_0
numpy-base 1.21.2 py37h0829f74_0
olefile 0.46 py37_0
openssl 1.1.1l h8ffe710_0 conda-forge
packaging 21.3 pyhd3eb1b0_0
pillow 8.4.0 py37hd45dc43_0
pip 21.2.4 py37haa95532_0
pydicom 2.2.2 pyh6c4a22f_0 conda-forge
pygamma 4.3.4 pypi_0 pypi
pyparsing 3.0.4 pyhd3eb1b0_0
pypubsub 4.0.3 py_0 conda-forge
pyqt 5.9.2 py37hd77b12b_6
python 3.7.11 h6244533_0
python-dateutil 2.8.2 pyhd3eb1b0_0
python_abi 3.7 2_cp37m conda-forge
qt 5.9.7 vc14h73c81de_0
scipy 1.7.3 py37h0a974cb_0
setuptools 58.0.4 py37haa95532_0
setuptools-scm 6.4.2 pyhd8ed1ab_0 conda-forge
sip 4.19.13 py37hd77b12b_0
six 1.16.0 pyhd3eb1b0_0
sqlite 3.37.0 h2bbff1b_0
tk 8.6.11 h2bbff1b_0
tomli 2.0.0 pyhd8ed1ab_1 conda-forge
tornado 6.1 py37h2bbff1b_0
uncertainties 3.1.6 pyhd8ed1ab_0 conda-forge
vc 14.2 h21ff451_1
vespa-suite 1.0.2 pypi_0 pypi
vs2015_runtime 14.27.29016 h5e58377_2
wheel 0.37.1 pyhd3eb1b0_0
wincertstore 0.2 py37haa95532_2
wxpython 4.0.4 py37ha925a31_0
xz 5.2.5 h62dcd97_0
zlib 1.2.11 h8cc25b3_4
zstd 1.4.9 h19a0ad4_0

This includes the name of the package, the version, the build, and the channel. Thank you again for all your support!

Warren

My bet is it’s a matplotlib. I’m still in 3.3 for mpl. wxPython are the same. I"ll let you know,

Brian.

you might try uninstalling mpl 3.5 and reinstall 3.3 for now?

Brian.

1 Like

Just uninstalled matplotlib 3.5 and reinstalled 3.3. Works great! Thanks again for all your assistance.

-Warren

Hi Warren & Brian, I recently found this same error with Vespa-1.0.2 on my 2018 MacBook Pro running OS 10.15.7 with Anaconda managing a python3.7 conda virtual environment (“vespa”), while trying to load a GE P-file.

Blockquote
Traceback (most recent call last):
File “vespa-suite/analysis/main.py”, line 232, in on_import_user_item
self._import_file(reader(), ini_name)
File “vespa-suite/analysis/main.py”, line 534, in _import_file
self.notebook_datasets.add_dataset_tab(datasets)
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/analysis/notebook_datasets.py”, line 246, in add_dataset_tab
dtab = tab_dataset.TabDataset(self, self.top, name)
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/analysis/tab_dataset.py”, line 80, in init
self.populate_controls()
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/analysis/tab_dataset.py”, line 134, in populate_controls
tab = tab_prep_fidsum.TabPrepFidsum(self, self.top, block)
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/analysis/tab_prep_fidsum.py”, line 88, in init
self.initialize_controls()
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/analysis/tab_prep_fidsum.py”, line 198, in initialize_controls
dataset=self.dataset,
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/analysis/plot_panel_prep_fidsum.py”, line 33, in init
super().init(parent, **kwargs)
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/common/wx_gravy/plot_panel_spectrum.py”, line 376, in init
self.update(set_scale=True)
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/common/wx_gravy/plot_panel_spectrum.py”, line 680, in update
self.update_plots()
File “/Users/carl/code/conda3/envs/vespa/lib/python3.7/site-packages/vespa/common/wx_gravy/plot_panel_spectrum.py”, line 763, in update_plots
axes.lines = []
AttributeError: can’t set attribute

As suggested, the problem was fixed by downgrading matplotlib from 3.5.1 to 3.3.4:

(vespa) Aoraki:vespa carl$ pip uninstall matplotlib
(vespa) Aoraki:vespa carl$ pip install -Iv matplotlib==3.3.4

Cheers,
Carl

Thanks Carl! Apologies for this issue still being open. Got caught up in funding issues (and teenage children at home ;)) so finding time has been difficult. I think that I’ve found the offending code in the display object, and have fixed it. But, now need to find time to test on multiple platforms before doing a release. Hopefully before November.

Best,

Brian.