Skip to content

Problem when import SimpleGrader #77

Open
@hugh-tong

Description

@hugh-tong
  • I found that in example/chaining/tank.py. I run the example and got:
Traceback (most recent call last):
  File "tank.py", line 27, in <module>
    grader = cb.SimpleGrader(mesh, 0.05)
AttributeError: module 'classy_blocks' has no attribute 'SimpleGrader'
  • And I found that in __init__.py,the SimpleGrader is imported with correct path!
from .grading.autograding.fixed.grader import FixedCountGrader
from .grading.autograding.simple.grader import SimpleGrader
from .grading.autograding.smooth.grader import SmoothGrader
  1. Then I use print(dir(cb)) to show the imported module. The three graders are all not imported!
['AnalyticCurve', 'Angle', 'Arc', 'Box', 'CircleCurve', 'ClampBase', 'Connector', 'CurveBase', 'CurveClamp', 'Cylinder', 'DiscreteCurve', 'Elbow', 'Extrude', 'ExtrudedRing', 'ExtrudedShape', 'ExtrudedStack', 'Face', 'FourCoreDisk', 'FreeClamp', 'Frustum', 'GeometricFinder', 'Grid', 'HalfDisk', 'HalfSplineDisk', 'HalfSplineRing', 'Hemisphere', 'LJoint', 'LineClamp', 'LineCurve', 'LinearInterpolatedCurve', 'LinkBase', 'Loft', 'LoftedShape', 'MappedSketch', 'Mesh', 'MeshOptimizer', 'MeshSmoother', 'Mirror', 'NJoint', 'OnCurve', 'OneCoreDisk', 'Operation', 'Origin', 'Oval', 'ParametricSurfaceClamp', 'PlaneClamp', 'PolyLine', 'Project', 'QuarterSplineDisk', 'QuarterSplineRing', 'RadialClamp', 'Revolve', 'RevolvedRing', 'RevolvedShape', 'RevolvedStack', 'Rotation', 'RotationLink', 'RoundSolidFinder', 'Scaling', 'SemiCylinder', 'Shape', 'Shear', 'Shell', 'SketchOptimizer', 'SketchSmoother', 'Spline', 'SplineDisk', 'SplineInterpolatedCurve', 'SplineRing', 'SymmetryLink', 'TJoint', 'TransformedStack', 'Translation', 'TranslationLink', 'ViewpointReorienter', 'Wedge', 'WrappedDisk', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'base', 'construct', 'grading', 'items', 'lists', 'mesh', 'modify', 'optimize', 'types', 'util']
  • After that, I think there may be problem with the filename 'grader' can not be same, I commet the other two but get the same error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions