Hi there,
I’ve adapted one of the bom scripts to suit my needs. When I run it from eschema “Bill of Material” / Generate, it fails on importing a digikey module with
Command error. Return code 1.
Traceback (most recent call last):
File "/home/scott/.local/share/kicad/6.0/plugins/bom.py", line 26, in <module>
import digikey
File "/home/scott/.local/lib/python3.10/site-packages/digikey/__init__.py", line 1, in <module>
from digikey.v3.api import (keyword_search, product_details, digi_reel_pricing, suggested_parts,
File "/home/scott/.local/lib/python3.10/site-packages/digikey/v3/api.py", line 4, in <module>
import digikey.oauth.oauth2
File "/home/scott/.local/lib/python3.10/site-packages/digikey/oauth/oauth2.py", line 14, in <module>
from certauth.certauth import CertificateAuthority
File "/home/scott/.local/lib/python3.10/site-packages/certauth/certauth.py", line 6, in <module>
from OpenSSL import crypto
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import SSL, crypto
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/SSL.py", line 19, in <module>
from OpenSSL.crypto import (
File "/usr/local/lib/python3.10/dist-packages/OpenSSL/crypto.py", line 3253, in <module>
utils.deprecated(
TypeError: deprecated() got an unexpected keyword argument 'name'
The script works perfectly in vscode and the command line. I’ve confirmed i’m using the same /usr/bin/python to run. I can import the digikey module by running python on the cli,
$ python
Python 3.10.7 (main, Nov 24 2022, 19:45:47) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import digikey
>>>
but I fail from KiPython.
Py 0.9.8
Python 3.10.7 (main, Nov 24 2022, 19:45:47) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import digikey
Traceback (most recent call last): <snip>
Is there an environment variable somewhere that I haven’t found yet, or a sandbox which isnt configured right?
This is KiCad 6.0.10, running on Ubuntu 22.10
Cheers,
Scott