Closed lorenzonebolosi closed 2 days ago
Are you planning to share them with the rest of us?
I don't see any ObjectListView
(except for one random comment) in wxPython source code. Is that a 3rd party library?
ObjectListView is an external package built a very long time ago - it depends on wxPython but it’s not part of it.
Oh, this? https://pypi.org/project/ObjectListView/
Looks unmaintained, unfortunately. No releases since 2015. You might have to fork it and fix it yourself, unless the issues are actually in wxPython. Post tracebacks?
This is the full traceback:
File "C:\my_project_path\views\DataTreeView.py", line 127, in OnTreeItemSelected
GasdynPreController().dispatch( events.SelectionEvent(events.SelectionEvent.ITEM_SELECTED,self.currentItem))
File "C:\my_project_path\patterns\mvc\Controller.py", line 22, in dispatch
event.commandResult = command().process( event )
File "C:\my_project_path\control\commands\SelectItemCommands.py", line 42, in process
ModelLocator().data.selection = selection
File "C:\my_project_path\patterns\mvc\binding\BindingSupport.py", line 94, in __setattr__
self.bindables[ name ].value = value
File "C:\my_project_path\patterns\mvc\binding\BindingSupport.py", line 178, in __setattr__
callback( self.model, self.name, old_value, value )
File "C:\my_project_path\views\MdiFrameView.py", line 113, in OnSelectionStateChanged
page.DisplayDetailsForItem(newSelectionVO.GetFirstSelection() if newSelectionVO else None )
File "C:\my_project_path\views\MdiFrameView.py", line 227, in DisplayDetailsForItem
self.dataNotebook.ViewDataForItem(item)
File "C:\my_project_path\views\DataView.py", line 35, in ViewDataForItem
panel = item.GetDataView( self )
File "C:\my_project_path\orm\BaseObjects.py", line 282, in GetDataView
return self.OnGetDataView( parent )
File "C:\my_project_path\orm\cylinders\Valves.py", line 257, in OnGetDataView
return dataview.ValvesPanel( self, parent )
File "C:\my_project_path\orm\cylinders\dataview\ValvesPanel.py", line 19, in __init__
valvesListBook = commonvalves.ValvesListNotebook( self.valves, self )
File "C:\my_project_path\orm\cylinders\dataview\commonvalves\ValvesListNotebook.py", line 16, in __init__
self.callbackValvesChange()
File "C:\my_project_path\orm\cylinders\dataview\commonvalves\ValvesListNotebook.py", line 50, in callbackValvesChange
self.GetCurrentPage().InitializeLayout()
File "C:\my_project_path\orm\cylinders\dataview\ValvePanel.py", line 28, in InitializeLayout
valvepanels.LiftsPanel( self.valve, self.notebook ),
File "C:\my_project_path\orm\cylinders\dataview\valvepanels\LiftsPanel.py", line 27, in __init__
self.callbackLifts()
File "C:\my_project_path\orm\cylinders\dataview\valvepanels\LiftsPanel.py", line 67, in callbackLifts
self.RefreshItems()
File "C:\my_project_path\orm\cylinders\dataview\valvepanels\LiftsPanel.py", line 70, in RefreshItems
self.lsvLifts.SetObjects( self.valve.lifts.value )
File "C:\my_python_path\Python\Python310\lib\site-packages\ObjectListView\ObjectListView.py", line 1007, in SetObjects
self.RepopulateList()
File "C:\my_python_path\Python\Python310\lib\site-packages\ObjectListView\ObjectListView.py", line 821, in RepopulateList
self.AutoSizeColumns()
File "C:\my_python_path\Programs\Python\Python310\lib\site-packages\ObjectListView\ObjectListView.py", line 632, in AutoSizeColumns
self._ResizeSpaceFillingColumns()
File "C:\my_python_path\Python\Python310\lib\site-packages\ObjectListView\ObjectListView.py", line 962, in _ResizeSpaceFillingColumns
self.SetColumnWidth(i, boundedWidth)
TypeError: ListCtrl.SetColumnWidth(): argument 2 has unexpected type 'float'```
Traceback comes from ObjectListView - I think @swt2c ’s suggestion is your best way forward, as ObjectListView is unmaintained.
in _ResizeSpaceFillingColumns line 962 set self.SetColumnWidth(i, int(boundedWidth)), I think
https://discuss.wxpython.org/t/ann-objectlistview3/36949
ObjectListView3 (v1.3.5) / Mike Driscoll Latest version: Jul 15, 2024 https://pypi.org/project/ObjectListView3/
or
Otherwise you can try these links
and remove all other traps as well
self.freezeUntil = time.clock() + self.updatePeriod
Using ObjectListView3 instead of ObjectListView solved the casting issue and probably other errors that I didn't encounter yet. Thanks to everybody!
Description of the problem: I have found some other error related to missing int casting, however is in the ObjectListView library. Is it possible? Is that library related to this one?