News features include:
User GUI (for that one that is not habituated with terminal). Just type kicost on terminal and the graphical interface will be loaded (it use wxPython already installed with using Python2 KiCad on Linux).
The GUI provide quick links to documentation, issue page and last released package.
The scrape modules were re-factored (thanks Max Maisel).
Digikey now accept currency, an old ask for users, configuration (missing in other distributors yet). Use --locale IT, for example for use Italy-Euro configuration (can be used on GUI in the second tab).
There is a long path to archive all the features implementation, so we expect for opinions and suggestions.
(kicost:10304): Gtk-WARNING **: Unable to locate theme engine in module_path: âadwaitaâ,
(kicost:10304): Gtk-WARNING **: Unable to locate theme engine in module_path: âadwaitaâ,
Traceback (most recent call last):
File â/usr/local/bin/kicostâ, line 11, in
sys.exit(main())
File â/usr/local/lib/python2.7/dist-packages/kicost/main.pyâ, line 233, in main
kicost_gui() # Use the user guide.
File â/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.pyâ, line 1051, in kicost_gui
frame = formKiCost(None)
File â/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.pyâ, line 252, in init
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
File â/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.pyâ, line 9718, in SetSizeHints
return core.Window_SetSizeHints(*args, **kwargs)
TypeError: in method âWindow_SetSizeHintsâ, expected argument 2 of type âintâ
marcos@silversurfer:~$
If all OK, comment the line 252 in kicost_gui.py that set the GUI default size. This may create some visual not fitting in first start but, after KiCost saves last size and position on the screen.
@marcos. Appear that you are right, the GUI was developed with compatibility with wxPython 4.x.x and KiCad still using 3.x.x on v5. Please, could you report in https://github.com/xesscorp/KiCost/issues/ to we track and keep a history?
On my machine now, I am using KiCost on Python3 with wxPython4. But we will track the source of this to improve the user experience and quick installation side-by-side KiCad.
marcos@silversurfer:/usr/local/lib/python2.7/dist-packages/kicost$ kicost
(kicost:31295): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
(kicost:31295): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
Traceback (most recent call last):
File "/usr/local/bin/kicost", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/kicost/__main__.py", line 233, in main
kicost_gui() # Use the user guide.
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 1053, in kicost_gui
frame = formKiCost(None)
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 530, in __init__
self.set_properties()
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 871, in set_properties
self.m_checkList_dist.Append(distributors_list)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 12856, in Append
return _core_.ItemContainer_Append(*args, **kwargs)
TypeError: String or Unicode type required
Cool, now it opens a window. When I load an .xml bom it and click âkicost itâ this exception is shown
marcos@silversurfer:/usr/local/lib/python2.7/dist-packages/kicost$ kicost
(kicost:10148): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
(kicost:10148): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 651, in run_kicost_guide
self.run() # Run KiCost.
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 735, in run
choisen_dist = list(self.m_checkList_dist.GetCheckedItems())
AttributeError: 'CheckListBox' object has no attribute 'GetCheckedItems'
The problem in the great part are function that wxPy3 just accept string and wxPy4 aso list, e.g. self.contro.Append(). @marcos ready for new try. Sorry by the iterative process, this machine redirect all the python to v3.