Skip to content

constraint --> constraints #4

Open
@dudung

Description

@dudung

I encounter a problem as executing intro7.py

AttributeError                            Traceback (most recent call last)
Input In [3], in <cell line: 10>()
      8 body.position = (350, 100)
      9 circle = pymunk.Circle(body, radius=20)
---> 10 joint = pymunk.constraint.PinJoint(space.static_body, body, (200, 200))
     12 space.add(body, circle, joint)
     14 App().run()

AttributeError: module 'pymunk' has no attribute 'constraint'

which I believe that the examples in introduction that containt

joint = pymunk.constraint.PinJoint()

should be corrected to

joint = pymunk.constraints.PinJoint()

as in pymunk/constraints, since it is missing the s.

The intro8.py and intro9.py must also be corrected.

I have submitted a pull request for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions