asammdf icon indicating copy to clipboard operation
asammdf copied to clipboard

asammdfgui not starting due to type error

Open bandeezy opened this issue 1 year ago • 2 comments

Python version

'python=3.10.6 (main, Nov  2 2022, 18:53:38) [GCC 11.3.0]'
'os=Linux-5.15.0-52-generic-x86_64-with-glibc2.35'
'numpy=1.24.4'
'asammdf=7.4.5'

Code

MDF version

No MDF file was used to produce error

Code snippet

asammdf GUI was used to produce error

Traceback

ldf is not supported
xls is not supported
  File "/home/nschwaiger/.local/bin/asammdf", line 8, in <module>
    sys.exit(main())
  File "/home/nschwaiger/.local/lib/python3.10/site-packages/asammdf/gui/asammdfgui.py", line 44, in main
    _main_window = MainWindow(measurements or args.measurements)
  File "/home/nschwaiger/.local/lib/python3.10/site-packages/asammdf/gui/widgets/main.py", line 46, in __init__
    self.batch = BatchWidget(
  File "/home/nschwaiger/.local/lib/python3.10/site-packages/asammdf/gui/widgets/batch.py", line 151, in __init__
    buses = lin_databases[::2]

<class 'TypeError'>: 'NoneType' object is not subscriptable
2024-08-19, 15:07:07
--------------------------------------------------------------------------------
<class 'TypeError'>	 
'NoneType' object is not subscriptable
--------------------------------------------------------------------------------
  File "/home/nschwaiger/.local/bin/asammdf", line 8, in <module>
    sys.exit(main())
  File "/home/nschwaiger/.local/lib/python3.10/site-packages/asammdf/gui/asammdfgui.py", line 44, in main
    _main_window = MainWindow(measurements or args.measurements)
  File "/home/nschwaiger/.local/lib/python3.10/site-packages/asammdf/gui/widgets/main.py", line 46, in __init__
    self.batch = BatchWidget(
  File "/home/nschwaiger/.local/lib/python3.10/site-packages/asammdf/gui/widgets/batch.py", line 151, in __init__
    buses = lin_databases[::2]

Description

Seeing an issue on startup of the asammdfgui which has worked fine in the past but I'm not entirely sure what has changed or how to debug the issue. No MDF file was selected yet.

bandeezy avatar Aug 19 '24 22:08 bandeezy

Please see issue 1098.

For Linux installs, if you delete the line "lin_databases=@Invalid()" in ~/.config/py-asammdf/py-asammdf.conf that should fix the issue (it did for me).

johnMediaOnFire avatar May 17 '25 00:05 johnMediaOnFire

I can confirrm @johnMediaOnFire's solution worked for me too

adrian-leon-fvt avatar Jun 05 '25 17:06 adrian-leon-fvt