AttributeError: ‘set’ object has no attribute ‘items’

As you can see from the latest updated code –

self.changes = {"MTMA",123}

When you define self.changes as above , you are actually defining a set , not a dictionary , since you used ‘,’ (comma) instead of colon , I am pretty sure in your actual code you are using comma itself , not colon .

To define a dictionary with “MTMA” as key and 123 as value , use a colon in between them , Example –

self.changes = {"MTMA":123}

Do similarly in your actual code as well.

If what you want is an empty dictionary , define it as –

self.changes = {}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)