简体   繁体   English

Kicad:使用 Python 导出 BOM 时出现错误 40

[英]Kicad: error 40 when exporting BOM using Python

From EESchema I'm trying the various BOM export scripts to find which one is better for my needs.在 EESchema 中,我正在尝试各种 BOM 导出脚本,以找出哪个更适合我的需要。 Most of them fails with the following error, though:但是,它们中的大多数都因以下错误而失败:

Run command:
python "/usr/share/kicad/plugins/bom_html_with_advanced_grouping.py" "/home/andrea/myboard.xml" "/home/andrea/myboard"

Command error. Return code -1
Error messages:
execvp(python, /usr/share/kicad/plugins/bom_html_with_advanced_grouping.py, /home/andrea/myboard.xml, /home/andrea/myboard) failed with error 40!

I cannot understand what is "error 40".我无法理解什么是“错误 40”。 Here the list of the scripts that fail:这里是失败的脚本列表:

bom_html_with_advanced_grouping.py
bom_html_grouped_by_value.py
bom_sorted_by_ref.py
bom_csv_sorted_by_ref.py
bom_csv_grouped_by_value_with_fp
bom_csv_grouped_by_value.py

They all seem to use Python, so I guess there's something wrong with it.他们似乎都使用Python,所以我猜它有问题。 But in my system I have a working python2 and python3 and I also checked the built-in Kicad's python is working (ie from Pcbnew I can successfully open Tools > Scripting Console).但是在我的系统中,我有一个工作的python2python3 ,我还检查了内置的 Kicad 的 python 是否工作(即从 Pcbnew 我可以成功打开工具>脚本控制台)。 So I don't think this is the problem (otherwise Kicad would have told if it hadn't found the needed dependencies).所以我认为这不是问题(否则 Kicad 会告诉它是否没有找到所需的依赖项)。

I also tried to create alias for python to python2 or python3 but nothing has changed.我还尝试将python的别名创建为python2python3 ,但没有任何改变。

Furthermore I don't understand if "Error 40" comes from Kicad, Python or execvp.此外,我不明白“错误 40”是否来自 Kicad、Python 或 execvp。

Kicad information:奇卡信息:

Application: Eeschema
Version: 5.1.9-73d0e3b20d~88~ubuntu20.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-65-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.71.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.68.0
    Compiler: GCC 9.3.0 with C++ ABI 1013

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

If you are not sure about a BOM script, to get diagnostics you can run them from the command line.如果您不确定 BOM 脚本,要获得诊断,您可以从命令行运行它们。 There is nothing special about the way KiCad invokes them. KiCad 调用它们的方式没有什么特别之处。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM