I’m a newbie here. Right now, I tried to follow all the instructions from the tutorial in pdf file. However, I am facing some problem here to generate the BOM file. Below is the error that I’m facing right now. I tried to follow the suggestion from the other post about this error but still stuck at this problem. I don’t know what else to do.
first thing to check for is [space] in paths… I see your user name has two of these.
Any chance you can test this with a USB stick (in case all you got is C:) as a base drive for the input and output path, as you need write access?
I would put money on it being spaces in the paths. Ideally, put everything in places that don’t need spaces.
It’s little known but all paths in windows still have an 8.3 name, but I think the only way to see it is to use a DOS prompt and “dir /X”. The 8.3 name can be substituted for the parts containing spaces.
The answer to that is “it depends”. If the path is in double quotes, most applications will handle / the same as “”. If the path is not in quotes, / may be confused with argument separator, again depends on application.
There are a few Unix applications ported to Windows that do not support , and need /.
He could use build in variables.
%P: path of the project
%I: xml file generated by bom tool
xsltproc -o “%Poutput_file_name” “C:/Program Files/KiCad/bin/scripting/plugins/bom2csv.xsl” “%I”
I think the tutoriaal1 could be the directory of the project. Not the output file (you can’t overwrite a directory with a file)
I already go through “e.g. Saxon BOM generation in "new" Kicad (Windows)”…but there is still some error which i don’t understand. Maybe it is because the [space] that cause the error.
It seems that xsltproc is sensitive in the first (output file) parameter only, the second and third parameters it accepts \ or /, and embedded spaces. “error 11” is an error specific to the output file.
If you do not use a path, you can have spaces in the name e.g.
I managed to solved it by transferring all the files from the project and also the bom2csv file into my USB stick as Joan’s recommendation. But for future project, do I need to do the same steps again?
As long as that particular bug/error exists in the code of whatever it is that you’re using, yes.
The ‘solution’ of putting the involved files onto a USB stick and having simple, short path’s points to what @bobc wrote about path handling.
It’s up to you (and others who have this problem) to try and chase that bug down (make it repeatable for certain conditions, like there is a [space] in the path somewhere) and write a bug report for the developers to work with.
If you don’t do that, it will never get fixed.
Personally I got an extra partition on my HDD which contains data only and have NOTHING in those windows/user folders at all… saves me a lot of headaches.
Here is another workaround to solve this issue due to spaces into the path of the first argument with Windows 10.
Use a symbolic link to create another path without spaces:
in a command window to run as administrator type the following:
cd /d D:/ mklink /D DocumentsBertrand “Documents Bertrand”
At the moment I’m working on my first design in KiCad. I’m quite new to the world of PCB design, though hardly new to electronics – I’ve lived and breathed electronics for the entirety of my existence. I am perplexed at how the rest of KiCad, while occasionally (okay, often) quirky, seems to be easy to pick up and generally “just works,” but the BOM generator tool resorts to the command line and doesn’t work out of the box! (But it’s free, so I’m not complaining, just pointing out an inconsistency/weakness which could use some attention.)
Anyways, I was contemplating symbolic links, but that seemed too complicated. I kept getting nothing but error 11, and out of desperation signed up to this forum! And then I figured out a solution by piecing together various answers above, and so I’ll share it. Giving back, you know?
The above worked for me. Note that I added “.exe” to the command, and neither my username nor my file output name had spaces. I am simply astonished that – in 2017 – Windows is incapable of handling spaces in file paths. Do any of you know if the BOM generator works out of the box on Linux/Mac, unlike the experience on Windows?
Without looking at the code that handles this, Id bet $10 this has to do with how it parses paths and not that this program runs on windows.
This is a matter of someone with some programming skills to feel the need that this needs to be solved, finding some time to get accustomed to how KiCAD (or this script in particular) is programmed, change it, test it, publish the work on the dev mailing list as a pull request, add some more time as feedback comes in and regression bugs enter the scene and finally someone to merge it with the main trunk so it can be part of the nightly releases and undergo further testing till at some nice day it turns up in a stable release.
The space in path only seems to be a problem with the first parameter, not on other parameters, so I think it is something about the port of xsltproc to windows, not Windows per se.
I am working on my second design in KiCad currently and was having this same problem. Your resolution fixed it for me. I used a specific path for the output file name and made sure that there were no spaces. I also added the “.exe” to the end of xsltproc…Success! Thank you!