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
Traceback (most recent call last):
File "bezier-curved-edges-networkx/run.py", line 14, in <module>
curves = curved_edges(G, positions)
File "bezier-curved-edges-networkx/curved_edges.py", line 58, in curved_edges
curveplots.append(bezier.Curve(nodes, degree=2).evaluate_multi(np.linspace(0,1,bezier_precision)).T)
File "/lib/python3.9/site-packages/bezier/curve.py", line 101, in __init__
self._verify_degree(verify)
File "/lib/python3.9/site-packages/bezier/curve.py", line 161, in _verify_degree
raise ValueError(msg)
ValueError: A degree 2 curve should have 3 nodes, not 4.
So when I set verify=False in line 58: curveplots.append(bezier.Curve(nodes, degree=2, verify=False).evaluate_multi(np.linspace(0,1,bezier_precision)).T)
it works!
Or instead, I can change the degree: curveplots.append(bezier.Curve(nodes, degree=3).evaluate_multi(np.linspace(0,1,bezier_precision)).T)
and this works too.
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for publishing this useful code!
The issue
When I run this code, I get the following error:
The potential fix
It looks like this is due to a release of the bezier package adding the
verify
argument to theCurve
constructor (this release: https://bezier.readthedocs.io/en/stable/releases/0.11.0.html).So when I set
verify=False
in line 58:curveplots.append(bezier.Curve(nodes, degree=2, verify=False).evaluate_multi(np.linspace(0,1,bezier_precision)).T)
it works!
Or instead, I can change the degree:
curveplots.append(bezier.Curve(nodes, degree=3).evaluate_multi(np.linspace(0,1,bezier_precision)).T)
and this works too.
The text was updated successfully, but these errors were encountered: