I have created a umqtt dir with all 5 files as proposed but when I run mqtt_publish.py or mqtt_subscribe it is reported ImportError: no module named ‘config’ meanwhile config.py it is inside umqtt dir
I am using Thonny 4.1.4
3 Answers
Hi.
I’m sorry. But I think you misunderstood.
The umqtt folder should only have two files: robust.py and simple.py
The config.py should be outside the umqtt folder as well as the other codes.
Let me know if this solves the issue.
Regards,
Sara
You are right after making that change it works. I was trying with other directory structures but never works.