Closed romain145 closed 3 years ago
Note: after installing all these packages by hand plus wxPython, KiCost starts successfully.
All KiCost requirements are listed by requirements
variable at setup.py
file. But I am not a expert in Python package and this file was present some issues, since I added the post_install_setup()
function to run some after installation configurations (this version is beta and not officially on PyPI).
Basically, now it is needed to install the pywin32
in the Windows case and run kicost --setup
command line, that make all the configuration integration Eeschema-KiCost (add KiCost to BOm list, add the standards fields, save the typing from user, add a shortcut to KiCost in case of GUI installation, ...).
Is the command kicost --setup
working for you? Do you mind to give a look on setup.py
?
Sorry I'm no expert in Python... By following this, it installs the dependencies: https://stackoverflow.com/questions/1471994/what-is-setup-py
Now only wsPython is missing, which can be solved by uncommenting the line in setup.py.
After doing this and running pip install .
KiCost can be launched.
@romain145, which line did you uncomment? which OS did you try?
If Windows, did I automatically get pywin32
python package? (wsPython
is not automatically installed, some users ask me to do that, but I have to be asked on KiCost installation with you want to download thi package).
Installation with pip fails on a new windows system. Steps to reproduce:
C:\Users\Romain>kicost
You don't have the wxPython dependence to run the GUI interface. Run once of the follow commands in terminal to install them:
pip3 install -U wxPython # For Windows & macOS
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython # For Linux 16.04
Or download from last version from <https://wxpython.org/pages/downloads/>
C:\Users\Romain>kicost
Traceback (most recent call last):
File "C:\Users\Romain\AppData\Local\Programs\Python\Python38-32\Scripts\kicost-script.py", line 11, in <module>
load_entry_point('kicost==1.1.4', 'console_scripts', 'kicost')()
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\__main__.py", line 253, in main
kicost_gui() # Use the user gui if no input is given.
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\kicost_gui.py", line 1065, in kicost_gui
frame = formKiCost(None)
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\kicost_gui.py", line 367, in __init__
fgSizer1.Add(self.m_gauge_process, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 5)
wx._core.wxAssertionError: C++ assertion "!(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL)) || !(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))" failed at ..\..\src\common\sizer.cpp(1453) in wxGridSizer::DoInsert(): wxEXPAND flag will be overridden by alignment flags```
Please, report kicost --info
information (with some library versions).
C:\Users\Romain>kicost --info KiCost v.1.1.4.at Python 3.8.3.on Windows-10-10.0.19041-SP0(32bit).Graphical library: 4.1.0 msw (phoenix) wxWidgets 3.1.4.
Are KiCost working fine as CLI (terminal) interface?
It does not run fine, but this may be another issue with the BOM list...
C:\Users\Romain\projects\jal>kicost -i jal.xml
Progress: 0%| | 0/40 [00:00<?, ?part/s]Traceback (most recent call last):
File "C:\Users\Romain\AppData\Local\Programs\Python\Python38-32\Scripts\kicost-script.py", line 11, in <module>
load_entry_point('kicost==1.1.4', 'console_scripts', 'kicost')()
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\__main__.py", line 306, in main
kicost(in_file=args.input, eda_name=args.eda,
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\kicost.py", line 251, in kicost
api_partinfo_kitspace.query_part_info(parts, distributor_dict, currency)
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\distributors\api_partinfo_kitspace.py", line 353, in query_part_info
get_part_info(queries[slc], query_parts[slc], query_part_stock_code[slc])
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\distributors\api_partinfo_kitspace.py", line 197, in get_part_info
results = api_partinfo_kitspace.query(query, distributors)
File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\distributors\api_partinfo_kitspace.py", line 135, in query
raise Exception('One of the internal Kitspace services may experiencing problems. Contact the Kitspace support.')
Exception: One of the internal Kitspace services may experiencing problems. Contact the Kitspace support.
Progress: 0%| | 0/40 [01:00<?, ?part/s]
The GUI problem appear to be same as #412
The CLI problem appear to be the Kitspace server offline. Not really a problem of KiCost code.
@hildogjr I've just installed KiCost and seeing the same issue. Installed via pip3. Seems like a long time for the Kitspace server to be offline?
KiCost v.1.1.4.at Python 3.8.6.on Windows-10-10.0.19041-SP0(64bit).Graphical library: 4.1.0 msw (phoenix) wxWidgets 3.1.4.
edit: I can run in CLI with no errors.
Yes, before was reported two behaviours:
I will close this, since already exist a ticket open for.
and documentation link gives a 404 error.
Steps performed:
Note: Wheel==0.23.0 has already been installed from requirement.py. Are the other packages also required?
Should all these be added to the requirements.txt file?