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
I've run generate_svg() on a couple of scripts now that successfully generate_netlists, but it consistently raises an exception UnboundLocalError: local variable 'num_units' referenced before assignment (with a traceback)
To Reproduce
Steps to reproduce the behavior:
Install skidl 1.1.0 (latest as of writing, but the exception occurs in 1.0.0 too)
Add generate_svg() to the bottom of a seemingly otherwise functional script (see snippet below)
Execute script
Snippet:
fromskidlimport*# Create input & output voltages and ground reference.vin, vout, gnd=Net('VI'), Net('VO'), Net('GND')
# Create two resistors.r1, r2=2*Part("Device.kicad_sym", 'R', TEMPLATE, footprint='Resistor_SMD.pretty:R_0805_2012Metric')
r1.value='1K'# Set upper resistor value.r2.value='500'# Set lower resistor value.# Connect the nets and resistors.vin+=r1[1] # Connect the input to the upper resistor.gnd+=r2[2] # Connect the lower resistor to ground.vout+=r1[2], r2[1] # Output comes from the connection of the two resistors.generate_svg()
Desktop (please complete the following information):
OS: Mac OSx 12
Python version: Python 3.10.6
SKiDL version 1.1.0
Additional context
As I mentioned at the top, I've attempted this on a few other designs, but it's consistently arising. I feel like this is something likely to have been raised before me though, so not sure what's up. Thank you for your assistance. It's greatly appreciated!
The text was updated successfully, but these errors were encountered:
Well, I found the reason for this error: the drawing commands for KiCad V6 symbols are not processed so there's nothing for the SVG generator to work on. This is a larger fix than I can do right now, so your only immediate fix is to drop back and use KiCad V5 libraries. Sorry!
Describe the bug
I've run
generate_svg()
on a couple of scripts now that successfullygenerate_netlist
s, but it consistently raises an exceptionUnboundLocalError: local variable 'num_units' referenced before assignment
(with a traceback)To Reproduce
Steps to reproduce the behavior:
generate_svg()
to the bottom of a seemingly otherwise functional script (see snippet below)Snippet:
Expected behavior
An SVG to be generated, per docs here: https://devbisme.github.io/skidl/#svg-schematics
Screenshots
![Screen Shot 2022-11-13 at 20 34 07](https://user-images.githubusercontent.com/4241578/201576018-8fadb6a3-005a-421a-bad4-9f1b4662b9f5.png)
Desktop (please complete the following information):
Additional context
As I mentioned at the top, I've attempted this on a few other designs, but it's consistently arising. I feel like this is something likely to have been raised before me though, so not sure what's up. Thank you for your assistance. It's greatly appreciated!
The text was updated successfully, but these errors were encountered: