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
I think this could be fixed by separating the samplers for lines and points then doing a class check on the sampler type. I never understood why lines and points used the same class name as they are different problems.
I think this could be fixed by separating the samplers for lines and points then doing a class check on the sampler type. I never understood why lines and points used the same class name as they are different problems.
A quick fix for the bug described in this issue has been added in #156
It's a good idea to separate lines and points; will add that to a feature request to work on in the future.
Version
m2l version= 3.1.13
Bug Description
map2loop allows users to pass a sampler rather than a decimator as an argument to the proj.set_sampler function as shown below:
proj.set_sampler(Datatype.STRUCTURE, SamplerSpacing(100.0))
In this example the argument should be SamplerDecimator(1) not SamplerSpacing(100.0)
This produces a "KeyError: 'layerID' " runtime error message when run and will prevent structural data from being input into the project file.
Minimal reproducible example
Using the following line of code to set the structural samplers for map2loop:
proj.set_sampler(Datatype.STRUCTURE, SamplerSpacing(100.0))
Expected Behavior
Passing the wrong argument type should result in an exception with an appropriate error message to notify users of their mistake.
Actual Behavior
The user is not currently notified, other than receiving a cryptic python "KeyError: 'layerID' " error message.
Additional Context
No response
Environment
Windows Version 10.0.22621.3593, Anaconda, Jupyter notebook
Severity
The text was updated successfully, but these errors were encountered: