VCV Rack Crashes After Following Plugin Development Tutorial

I didn’t touch the SVG file at all. I was just using the default file from website. I dug into helper.py a little bit and tried to figure out why my components were being scaled. I think I may have found something though. I don’t often use the re library or regex but I wonder if the issue has to do with the ‘scale’ parameter in helper.py

The variable root_width is a floating point number (30.48mm in my case) and I wonder if this expression only accounts for decimal/whole numbers:

if re.match(‘\d+mm’, root_width):

Here is the broader snippet where that code comes from:

def panel_to_components(tree):
	ns = {
		"svg": "http://www.w3.org/2000/svg",
		"inkscape": "http://www.inkscape.org/namespaces/inkscape",
	}

	root = tree.getroot()
	# Get SVG scale relative to mm
	root_width = root.get('width')
	if re.match('\d+mm', root_width):
		scale = 1
	else:
		svg_dpi = 75
		mm_per_in = 25.4
		scale = mm_per_in / svg_dpi

If I force the ‘else’ statement to set the scale = 1, the module ends up looking just fine: image

Still crashing when the module gets deleted though :smiley:

I’m not married to the idea of sticking with helper.py …! I just want to get started and this is the route the VCV Rack site sent me down. Any other approaches/guides are much appreciated.