Closed mxa closed 1 year ago
ok, so 23.04 seems to have done something to pip.
This is Python policy, not Debian policy (PEP 668). You can try doing what the explanation says, this is use --break-system-packages
. But I'll suggest other solution: install it from the KiBot Debian repo: https://set-soft.github.io/debian/
After adding the repo and updating the packages list you'll be able to install the kicost
Debian package.
IMHO pip (and all the Python module and package system) is poorly designed and strongly biased towards inefficient Windows usage. But this seems to be the fashion of the moment. Things are even worst in the Ruby and JavaScript front.
nice, a debian package! however my config seems gone:
kicost
WARNING:(WC018) Unknown API `Octopart` (kicost - config.py:112)
WARNING:(WC017) Can't enable Digi-Key without a `client_id`, `client_secret` and `cache_path` (kicost.distributors - api_digikey.py:113)
WARNING:(WC017) Can't enable Elemen14 without a `key` (kicost.distributors - api_element14.py:253)
WARNING:(WC017) Can't enable TME without a `token` and an `app_secret` (kicost.distributors - api_tme.py:296)
WARNING:(WC017) Can't enable Nexar without a `client_id`, `client_secret` and `cache_path` (kicost.distributors - api_nexar.py:209)
Traceback (most recent call last):
File "/home/mxa/.local/bin/kicost", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/kicost/__main__.py", line 479, in main
main_real()
File "/usr/lib/python3/dist-packages/kicost/__main__.py", line 410, in main_real
kicost_gui(args.force_en_us) # Use the user gui if no input is given.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kicost_gui() missing 4 required positional arguments: 'files', 'configure_kicost_apis', 'command_line_api_options', and 'args'
nice, a debian package! however my config seems gone:
Where did you save it? Is it in ~/.config/kicost/?
File "/home/mxa/.local/bin/kicost", line 8, in
Uninstall this stuff from pip, you are running an old version script that is trying to use the new kicost. The simplest thing to try is to remove /home/mxa/.local/bin/kicost, so you get the tool from /usr/bin/.
Where did you save it? Is it in ~/.config/kicost/?
Yes, there is the config.yaml
Uninstall this stuff from pip, you are running an old version script that is trying to use the new kicost. The simplest thing to try is to remove /home/mxa/.local/bin/kicost, so you get the tool from /usr/bin/.
I've removed kicost there with ~/.local/bin$ rm kicost
and verified it's gone.
However, still getting the similar error (this time it's /usr/local/bin/kicost
)
WARNING:(WC018) Unknown API `Octopart` (kicost - config.py:112)
WARNING:(WC017) Can't enable Digi-Key without a `client_id`, `client_secret` and `cache_path` (kicost.distributors - api_digikey.py:113)
WARNING:(WC017) Can't enable Elemen14 without a `key` (kicost.distributors - api_element14.py:253)
WARNING:(WC017) Can't enable TME without a `token` and an `app_secret` (kicost.distributors - api_tme.py:296)
WARNING:(WC017) Can't enable Nexar without a `client_id`, `client_secret` and `cache_path` (kicost.distributors - api_nexar.py:209)
Traceback (most recent call last):
File "/usr/local/bin/kicost", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3/dist-packages/kicost/__main__.py", line 479, in main
main_real()
File "/usr/lib/python3/dist-packages/kicost/__main__.py", line 410, in main_real
kicost_gui(args.force_en_us) # Use the user gui if no input is given.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kicost_gui() missing 4 required positional arguments: 'files', 'configure_kicost_apis', 'command_line_api_options', and 'args'
Also deleted all files in cache ~/.cache/kicost
with no effect
"/usr/local/bin/kicost"
You still have copies of KiCost at local places. You must ensure only one is installed.
after removing that one too, I get:
kicost
WARNING:(WC018) Unknown API `Octopart` (kicost - config.py:112)
WARNING:(WC017) Can't enable Digi-Key without a `client_id`, `client_secret` and `cache_path` (kicost.distributors - api_digikey.py:113)
WARNING:(WC017) Can't enable Elemen14 without a `key` (kicost.distributors - api_element14.py:253)
WARNING:(WC017) Can't enable TME without a `token` and an `app_secret` (kicost.distributors - api_tme.py:296)
WARNING:(WC017) Can't enable Nexar without a `client_id`, `client_secret` and `cache_path` (kicost.distributors - api_nexar.py:209)
Traceback (most recent call last):
File "/usr/bin/kicost", line 33, in <module>
sys.exit(load_entry_point('kicost==1.1.17', 'console_scripts', 'kicost')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/kicost/__main__.py", line 479, in main
main_real()
File "/usr/lib/python3/dist-packages/kicost/__main__.py", line 410, in main_real
kicost_gui(args.force_en_us) # Use the user gui if no input is given.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kicost_gui() missing 4 required positional arguments: 'files', 'configure_kicost_apis', 'command_line_api_options', and 'args'
Ok, I see. Try calling KiCost using: kicost --gui NAME_OF_THE_XML_NETLIST
About the missing config options: run KiCost with --debug 10 option to look from where is the config loaded.
About the missing config options: run KiCost with --debug 10 option to look from where is the config loaded.
Hi, i am having the same issue with the config, I recently installed the KiCost using the documentation.
after running kicost --debug i got this -
C:\Users\naman\Documents\KiCad\7.0>kicost --debug
WARNING:(WC017) Can't enable Digi-Key without a client_id
, client_secret
and cache_path
(kicost.distributors - log.py:107)
WARNING:(WC017) Can't enable Mouser without a key
(kicost.distributors - log.py:107)
WARNING:(WC017) Can't enable Elemen14 without a key
(kicost.distributors - log.py:107)
WARNING:(WC017) Can't enable TME without a token
and an app_secret
(kicost.distributors - log.py:107)
WARNING:(WC017) Can't enable Nexar without a client_id
, client_secret
and cache_path
(kicost.distributors - log.py:107)
Traceback (most recent call last):
File "C:\Program Files\KiCad\7.0\bin\Lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\KiCad\7.0\bin\Lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\naman\AppData\Local\Programs\Python\Python311\Scripts\kicost.exe__main.py", line 7, in
KiCost 1.1.18 should fix the no arguments issue
I just installed 1.1.18 and still get the same warning of not finding distributors
1.1.18 fixes the missing 4 required positional arguments issue, but isn't magic.
DEBUG:Loading config from: C:\Users\Ahmed Al-Tawil.config\kicost\config.yaml (kicost - log.py:115)
Here is the file where you MUST add your tokens, KiCost can't provide tokens for you. Not at least for free.
ok, so 23.04 seems to have done something to pip.
ok, so on stackexchange i find a recommendation to use pipx.
okay, in that logfile i read:
error: subprocess-exited-with-error