You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The bom output fails when the set_text_variables_before_output: true is set. The output works fine when the option is removed (left at the default) This traceback is printed when it fails.
'Spreadsheet for the Bill of Materials' (bom_xlsx) [bom]
Traceback (most recent call last):
File "/usr/bin/kibot", line 33, in
sys.exit(load_entry_point('kibot==1.7.0', 'console_scripts', 'kibot')())
File "/usr/lib/python3/dist-packages/kibot/main.py", line 549, in main
generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 608, in generate_outputs
_generate_outputs(outputs, targets, invert, skip_pre, cli_order, no_priority, dont_stop)
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 598, in _generate_outputs
run_output(out, dont_stop)
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 498, in run_output
pre.apply()
File "/usr/lib/python3/dist-packages/kibot/pre_set_text_variables.py", line 157, in apply
new_text = Optionable.expand_filename_both(self, text, make_safe=False)
File "/usr/lib/python3/dist-packages/kibot/optionable.py", line 367, in expand_filename_both
name = Optionable.expand_filename_common(self, name, parent)
File "/usr/lib/python3/dist-packages/kibot/optionable.py", line 329, in expand_filename_common
name = name.replace('%S', _cl(self._find_subpcb()))
File "/usr/lib/python3/dist-packages/kibot/pre_base.py", line 207, in _find_subpcb
if hasattr(self, '_variant') and self._variant and self.variant._sub_pcb:
AttributeError: 'Set_Text_Variables' object has no attribute 'variant'. Did you mean: '_variant'?
To Reproduce
Occurs when the following is present in the configuration file
global:
set_text_variables_before_output: true
outputs:
- name: 'bom_xlsx'
comment: "Spreadsheet for the Bill of Materials"
type: bom
dir: bom
options: &bom_options
xlsx:
title: 'KiBot variants example'
columns:
- Row
- References
- Quantity Per PCB
Environment
Issue occurs in bitbucket pipeline and locally using
Describe the bug
The bom output fails when the set_text_variables_before_output: true is set. The output works fine when the option is removed (left at the default) This traceback is printed when it fails.
'Spreadsheet for the Bill of Materials' (bom_xlsx) [bom]
Traceback (most recent call last):
File "/usr/bin/kibot", line 33, in
sys.exit(load_entry_point('kibot==1.7.0', 'console_scripts', 'kibot')())
File "/usr/lib/python3/dist-packages/kibot/main.py", line 549, in main
generate_outputs(outputs, args.target, args.invert_sel, args.skip_pre, args.cli_order, args.no_priority,
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 608, in generate_outputs
_generate_outputs(outputs, targets, invert, skip_pre, cli_order, no_priority, dont_stop)
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 598, in _generate_outputs
run_output(out, dont_stop)
File "/usr/lib/python3/dist-packages/kibot/kiplot.py", line 498, in run_output
pre.apply()
File "/usr/lib/python3/dist-packages/kibot/pre_set_text_variables.py", line 157, in apply
new_text = Optionable.expand_filename_both(self, text, make_safe=False)
File "/usr/lib/python3/dist-packages/kibot/optionable.py", line 367, in expand_filename_both
name = Optionable.expand_filename_common(self, name, parent)
File "/usr/lib/python3/dist-packages/kibot/optionable.py", line 329, in expand_filename_common
name = name.replace('%S', _cl(self._find_subpcb()))
File "/usr/lib/python3/dist-packages/kibot/pre_base.py", line 207, in _find_subpcb
if hasattr(self, '_variant') and self._variant and self.variant._sub_pcb:
AttributeError: 'Set_Text_Variables' object has no attribute 'variant'. Did you mean: '_variant'?
To Reproduce
Occurs when the following is present in the configuration file
Environment
Issue occurs in bitbucket pipeline and locally using
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: