Skip to content

Maximum Recursion Depth Exceeded on getattr #158

@Jrendl

Description

@Jrendl

If one attempts to get any attribute on a child class of HybridCore or DynamicCore before the initializer is called (so the attributes object has yet to be initialized) the custom getattr implementation on the class causes an infinite recursion. getattr is called on the attribute of the class -> HybridCore attempts to evaluate if name in self.attributes: but attributes is undef -> since attributes is undef, python calls getattr on self.attributes -> HybridCore attempts to evaluate if name in self.attributes: but attributes is undef -> etc.

IMO, HybridCore should fall back to the standard implementation of getattr if self.attributes is undefined which would avoid this issue.

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