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
{{ message }}
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
from gerber import load_layer
from gerber.render.cairo_backend import GerberCairoContext
class Foo:
def __init__(self):
self.ctx = GerberCairoContext()
def render(self):
l = load_layer('gerbers/test.gbr')
self.ctx.render_layer(l)
def render():
ctx = GerberCairoContext()
l = load_layer('gerbers/test.gbr')
ctx.render_layer(l)
# works
render()
# doesn't work
f = Foo()
f.render()
The call to Foo classes render() from the example above fails with the following error:
From cffi callback <function _make_write_func.<locals>.write_func at 0x7f90a84a0560>:
Traceback (most recent call last):
File "/home/py/.local/share/virtualenvs/src-hLxFx5mL/lib/python3.7/site-packages/cairocffi/surfaces.py", line 43, in write_func
File "/usr/local/lib/python3.7/tempfile.py", line 481, in func_wrapper
ValueError: write to closed file
Running the code using the python:3.7-buster container image.
The text was updated successfully, but these errors were encountered:
The call to
Foo
classesrender()
from the example above fails with the following error:Running the code using the
python:3.7-buster
container image.The text was updated successfully, but these errors were encountered: