openscopeproject / openscopeproject/InteractiveHtmlBom
Trailing backslash in dest-dir and error message
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 578
- Avg merge
- 5h 24m
- Merged PRs (30d)
- 2
Description
Hi
I'm having some problems trying to launch the program from command line. If I write
"C:\Program Files\KiCad\10.0\bin\python.exe" "C:\Users\user\Documents\KiCad\10.0\3rdparty\/plugins/org_openscopeproject_InteractiveHtmlBom/generate_interactive_bom.py" --dest-dir "docs" --no-browser --checkboxes Placed --include-tracks SmartRelay_4CH.kicad_pcb
the command succeeds. If, on the other hand, I write
"C:\Program Files\KiCad\10.0\bin\python.exe" "C:\Users\user\Documents\KiCad\10.0\3rdparty\/plugins/org_openscopeproject_InteractiveHtmlBom/generate_interactive_bom.py" --dest-dir "docs\" --no-browser --checkboxes Placed --include-tracks SmartRelay_4CH.kicad_pcb
(so with a trailing backslash in the --dest-dir parameter) the command fails with the message:
generate_interactive_bom.py: error: the following arguments are required: file
I'd need this since I'm writing a custom jobset (not working due to KiCad 10 issues with paths, so work in progress) and I want to put the file in ${JOBSET_OUTPUT_WORK_PATH}, but this variable has a trailing backslash.
The workaround is to write "${JOBSET_OUTPUT_WORK_PATH}." to remove the trailing backslash, but it would be useful to avoid using hacks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the command-line entry point in generate_interactive_bom.py and reproduce the two --dest-dir invocations from the issue on Windows. Trace how a trailing backslash changes argument parsing, then verify that the command accepts the path and still identifies the PCB file argument correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100