Pycharm 2022.2.2 Raising AttributeError with user defined classes and not recognizing attributes in __init__

Hi all. I've noticed an issue recently when trying to create user-defined classes in Pycharm 2022.2.2. 

Say you have the following simple class.

class A:
def __init__(self, name): = name

a = A(name='Will') # This is raising an AttributeError

In Pycharm, it's not recognizing my __init__ attributes.


Is this a known bug and does anyone have a solution for it?






1 comment
Hi, there might be something wrong with your project/environment.

I would start by looking at the screenshot of the issue -- could you please provide a screenshot of the whole IDE window? It may show some hints. Also a screenshot of your project structure ( would help.

Please sign in to leave a comment.