Comments (4)
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.
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.
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
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.
More information.
I found the 'kicad_netlist_reader' in my KiCad folder ...KiCad\6.0\bin\scripting\plugins .
See screen shot:
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.
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)
- rotation source and wildcards/regex in overrides HOT 5
- TypeError: 'newline' is an invalid keyword argument for this function in python3 HOT 3
- kicad v5.1.7 doesn't like the newline argument
- How do you actaully run kicad_pos_to_cpl.py? HOT 3
- Caps and Resistors "LCSC Part #" not included in BOM HOT 1
- python3 compatibility HOT 6
- BOM exporter doesn't run on MacOS HOT 1
- No module named 'kicad_netlist_reader' HOT 1
- ModuleNotFoundError: No module named ‘kicad_netlist_reader’ HOT 1
- LCSC Part # column is empty HOT 1
- Trouble using plugin HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kicad-jlcpcb-bom-plugin.