I just managed to replicate your problem in the latest build.
Here’s how O’ve fixed it on my system:
python3 “[path_to_kicad]/KiCad.app/Contents/SharedSupport/plugins/bom_csv_grouped_by_value.py” “%I” “%O.csv”
I’m not sure if script is using system python3 or embedded one. Without specifying python3 get similar error.
Note that in the first error there is a space introduced into the path before “Consulting”
In the second error there is a comma and a space introduced at the same place.
Try moving the project to a path without any spaces or other odd characters in it (try copying it to the desktop, for instance) and run the BOM generation from there. I try and avoid any spaces in paths these days as I’ve run into numerous problems with scripts over the years.
Ah - OK - I thought you might have had ~/Documents, Consulting/ as a real path. I had a recent problem with the generator in 5.99 too - no probs with 5.1 but unable to generate a BOM. XML looked good. Problem seemed to be related to a symbol I had edited and went away when I changed back to the original symbol. I have not been able to repeat it.
OK this is making sense then. I am seeing a populated XML file so that part worked at least with one of my attempts. I may have some edited symbols. I guess I should try this thing on a simpler file and see what that yields. This has been a time consuming an frustrating endeavor.
This worked for me using Macos 11.5.1
Changed python to python3.
Example:
python3 “/Applications/KiCad/KiCad.app/Contents/SharedSupport/plugins/bom_csv_grouped_by_value.py” “%I” “%O.csv”
Thanks for the report mibac
I would have to assume it’s something in my system or Python installs. My OS is two behind yours - shouldn’t be much of big deal as python is doing all the work.
Just a puzzle so far with impenetrable errors. I would reload v 5.1 to get my job out if I thought I could get the files to go back there - but from what I read, file format has been updated.
Maybe I’ll see if I can pick through the XML file by hand
I think it’s finding python. I can’t interpret the meager exit codes.
I thought it was making the XML successfully but that seems like it may have only happened once. I’ve set all the permissions wide open, changed the owner of the files and tried a variety of absolute paths. I’ve chewed up more time than I would like on this issue and I’ve got a board that I need to order parts for. I’m going to bite the bullet soon and do it by hand but that won’t help the next person.
I am not sure how recent your 5.99 installation is but there has been quite a bit of work on Python3 in KiCad recently, so you might find a more recent build has fixed it. I can build BOMs on my macOS build from Version: (5.99.0-11626-g43523df843) which I downloaded a few days ago.
You could try including the full path to the KiCad provided python - this should pull in the site-packages.
Otherwise, a couple of workarounds. You could try an alternative BOM exporter. There are a couple of external ones - KiBOM is one that I use most of the time.
You can directly copy and paste from the symbol field table into a spreadsheet.
My previous post listed info for creating a BOM file on a macbookpro with Mac OS 11.4
Today I was using a MacPro with Mac OS 10.14.6. The following command worked for me in the BOM dialog box. Using Kicad 5.99 nightly Version: (5.99.0-11444-g3c721c55de), release build.
thanks - I checked the path to the python script which seemed correct on my setup. There is some mystery in my Kicad setup I believe. I just downloaded the latest nighty version. So if the XML is being created how can the CSV file be not found?
Some permissions issue? - I have the whole directory as set wide open at 777
XML is being created - problems are in creating the CSV
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.8/bin/python3.8 “/Applications/KiCad/KiCad.app/Contents/SharedSupport/plugins/bom_csv_grouped_by_value.py” “/Users/paulbadger/Documents/testProj/testProject/testProject.xml” “/Users/paulbadger/Documents/testProj/testProject/testProject.csv”
Command error. Return code 2.
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.8/bin/python3.8: can’t open file ‘“/Applications/KiCad/KiCad.app/Contents/SharedSupport/plugins/bom_csv_grouped_by_value.py”’: [Errno 2] No such file or directory