Coder Social home page Coder Social logo

Comments (4)

carlsa avatar carlsa commented on June 11, 2024 1

I had the same issue on Linux with KiCad 6 installed as a flatpak.

I solved it by adding the KiCad system installation plugin folder to the python path by adding this in the top of bom_csv_jlcpcb.py.

import sys
sys.path.append('/usr/share/kicad/plugins')

I guess one could also solve it by placing the script in /usr/share/kicad/plugins

Thank you for creating the project @urish 🙂

KiCad 7 flatpak update
For the KiCad 7 Flatpak distribution I added this to the top of the script:

import sys
sys.path.append('/app/share/kicad/plugins')

from kicad-jlcpcb-bom-plugin.

ciaagent avatar ciaagent commented on June 11, 2024

Same.

python3 "C:\Users\xx\Documents\KiCad\6.0\scripting\plugins/bom_csv_jlcpcb.py" "D:\Data\Projects\KiCad\ESP32 PC Front Panel\ESP32 PC Front Panel.xml" "D:/Data/Projects/KiCad/ESP32 PC Front Panel/ESP32 PC Front Panel.csv" Command error. Return code 1. Traceback (most recent call last): File "C:\Users\xx\Documents\KiCad\6.0\scripting\plugins\bom_csv_jlcpcb.py", line 23, in <module> import kicad_netlist_reader ModuleNotFoundError: No module named 'kicad_netlist_reader'

from kicad-jlcpcb-bom-plugin.

ForrestErickson avatar ForrestErickson commented on June 11, 2024

I also have the error ModuleNotFoundError: No module named 'kicad_netlist_reader' when running the bom_csv_jlcpcb.

Full error:

python "C:\Users\Public\Downloads\programs\KiCad_JLCPCBPlugIn\kicad-jlcpcb-bom-plugin/bom_csv_jlcpcb.py" "C:\Users\Public\Downloads\Arduino\PubInv\general-alarm-device\Hardware\PolyVent_SPI_Controller\PolyVent_SPI_Controller.xml" "C:/Users/Public/Downloads/Arduino/PubInv/general-alarm-device/Hardware/PolyVent_SPI_Controller/PolyVent_SPI_Controller.csv"
Command error. Return code 1.
Traceback (most recent call last):
File "C:\Users\Public\Downloads\programs\KiCad_JLCPCBPlugIn\kicad-jlcpcb-bom-plugin\bom_csv_jlcpcb.py", line 23, in
import kicad_netlist_reader
ModuleNotFoundError: No module named 'kicad_netlist_reader'

I am running Windows 10.
I am running this version of KiCad 6.0.6
image

I would suspect the root cause is that we need a module 'kicad_netlist_reader'
But from where would this come?

from kicad-jlcpcb-bom-plugin.

ForrestErickson avatar ForrestErickson commented on June 11, 2024

More information.
I found the 'kicad_netlist_reader' in my KiCad folder ...KiCad\6.0\bin\scripting\plugins .
See screen shot:
image

I moved my Wikwi python scripts into this folder and had to press the button regarding administrative privileges.
I reran the script and now get a new error.

python "C:\Program Files\KiCad\6.0\bin\scripting\plugins/bom_csv_jlcpcb.py" "C:\Users\Public\Downloads\Arduino\PubInv\general-alarm-device\Hardware\PolyVent_SPI_Controller\PolyVent_SPI_Controller.xml" "C:/Users/Public/Downloads/Arduino/PubInv/general-alarm-device/Hardware/PolyVent_SPI_Controller/PolyVent_SPI_Controller.csv"
Command error. Return code 1.
Traceback (most recent call last):
File "C:\Program Files\KiCad\6.0\bin\scripting\plugins\bom_csv_jlcpcb.py", line 48, in
out.writerow([c.getValue() + " " + c.getDescription(), ",".join(refs), c.getFootprint().split(':')[1],
IndexError: list index out of range

The indexError:list index out of range requires the next investigation.

Continued...
I found that the script did make a file and it has some but not all rows necessary to cover all my component types as a BOM should. I expect 29 rows based on the BOM I get from the KiCad bom scripts that do work.

Something caused the index out of range error.
image

Of course the column "LCSC Part #" is empty because I do not have such a field in my parts (yet).

Another root cause of this not working is that the required Symbol Properties fields required were not defined byt this project. The requirements could be put for example in the README.md of this project.

from kicad-jlcpcb-bom-plugin.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.