srobo/comp-floorplans

Can't build the 2017 floorplans

Closed this issue · 1 comments

When I run make in the 2017 folder I get an error:

floorplans/2017 $ make
inkscape -A build/pits-floor-2.pdf <(./munge-svg.py @pits-floor-2.diagram)
Traceback (most recent call last):
  File "./munge-svg.py", line 76, in <module>
    munger.munge(src, dst)
  File "./munge-svg.py", line 46, in munge
    template = self.select_layers(src.read())
  File "./munge-svg.py", line 54, in select_layers
    for layer in root.findall(".//svg:g[@inkscape:label]", root.nsmap):
  File "src/lxml/lxml.etree.pyx", line 1563, in lxml.etree._Element.findall (src/lxml/lxml.etree.c:61450)
  File "/usr/lib/python2.7/dist-packages/lxml/_elementpath.py", line 304, in findall
    return list(iterfind(elem, path, namespaces))
  File "/usr/lib/python2.7/dist-packages/lxml/_elementpath.py", line 277, in iterfind
    selector = _build_path_iterator(path, namespaces)
  File "/usr/lib/python2.7/dist-packages/lxml/_elementpath.py", line 234, in _build_path_iterator
    raise ValueError("empty namespace prefix is not supported in ElementPath")
ValueError: empty namespace prefix is not supported in ElementPath

** (inkscape:23106): WARNING **: Error:  Could not open file '/dev/fd/63' with VFS


** (inkscape:23106): WARNING **: Error:  Could not open file '/dev/fd/63' with VFS


** (inkscape:23106): WARNING **: Specified document /dev/fd/63 cannot be opened (does not exist or not a valid SVG file)
Makefile:15: recipe for target 'build/pits-floor-2.pdf' failed
make: *** [build/pits-floor-2.pdf] Error 1

This is currently preventing me updating the compstate as I can't verify that the teams' locations are being correctly assigned in the compstate's layout.yaml.

@PeterJCLaw Rob just pointed out that my fix allowed it to build, but the generated PDFs were all the same (the layer selection wasn't actually working). I've just pushed a fix for this so everything should now be generated as expected. I don't think this will have affected your intended use as the pit labels happened to be enabled by default in the SVGs anyway.