What is the meaning of AttributeError: 'str' object has no attribute 'X'?

What is the meaning of AttributeError: ‘str’ object has no attribute ‘keys’ exactly in the code like following?

1 Like

what exercise are you on?

1 Like

I write that myself and want to be familiar with different errors to eradicate that. I want to know what type is that and what is the cause of that.

1 Like

What the error was saying is that on this line there is no variable defined as keys that is callable or printable.

1 Like

Why should I have this error? I used i.keys() which is a method and I want print that!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.