[bug] Title not updating on html output
Trying a few things to get the title in the html output to update from the default "WireViz diagram and BOM".
I have the yaml file already saved in a directory, but the title isn't being taken from the file name. Adding
title: custom
doesn't seem to fix it either.
Commenting out the checks in wireviz.py to force it to use Path(yaml_file).stem just results in
TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'NoneType'
@the-hess - Thank you for reporting this unexpected result, but please always provide all information about your set of versions as described in contributing guidelines and how you installed WireViz and dependencies. In your case, a YAML input example that triggers the unexpected output is also needed. Otherwise, it might be hard to help you when nobody knows how to recreate the error you report.
Apologies, I'm currently using version the 0.4 and have (manually) implemented the basic fixes in https://github.com/wireviz/WireViz/pull/346 and https://github.com/wireviz/WireViz/pull/347.
Graphviz version 9.0.0 (20230911.1827) Python 3.12.2
yml:
options:
mini_bom_mode: false
title: 07-0609
connectors:
P1:
type: XLR
subtype: Male
pincount: 4
pinlabels: [GND, 24Vin, Signal, 24Vsafe]
manufacturer: RS PRO
mpn: 457-908
image:
src: resources/XLR.png
width: 250
S1:
type: E-Stop
subtype: Pushbutton
show_pincount: false
pins: [1,2,3,4]
pinlabels: [11,21,12,22]
pincount: 4
manufacturer: ABB
mpn: CEPY1-1002
image:
src: resources/EStop.png
width: 250
B:
style: simple
type: Bootlace Ferrule
color: VT
manufacturer: RS PRO
mpn: 157-1216
cables:
W1:
#category: bundle
colors: [BK, RD, WH, GN]
length: 1500
length_unit: mm
gauge: 18 AWG
manufacturer: Belden
mpn: 4302FE.00100
additional_components:
-
type: Clear Heatshrink
subtype: 6mm diameter, 3:1 shrink ratio
qty: 120
unit: mm
manufacturer: RS PRO
mpn: 700-4456
-
type: Label
subtype: White/Transparent
manufacturer: Brady
mpn: THT-64-427-3
qty: 2
notes: |
Affix part number at midpoint of cable using Brady label
Affix "To S4" at endpoint of cable next to P1
Secure each label with 60mm clear heatshrink
connections:
-
- P1: [1-4]
- W1: [1-4]
- B.
- -->
- S1: [1-4]
@the-hess - Thank you for the information needed to investigate this.
- I can confirm there is an unfortunate title bug in v0.4 - please try my PR #361 and report your finding.
- Your attempt to override the title with
title: 07-0609in the YAML input failed because it needs to be within a top-levelmetadatasection like this:
metadata:
title: 07-0609
The relevant fixes are now merged into the release/v0.4.1-rc branch of PR #365 that is not yet released, but also describes how you can install the latest collection of fixes before the release.
Closed after releasing v0.4.1.