• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Raspberry pi pico/pico W with micropython / module 12 MQTT – ImportError: no module named 'config'

Q&A Forum › Category: Raspberry Pi › Raspberry pi pico/pico W with micropython / module 12 MQTT – ImportError: no module named 'config'
0 Vote Up Vote Down
Fernando Inácio asked 1 year ago

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
0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

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

0 Vote Up Vote Down
Fernando Inácio answered 1 year ago

You are right after making that change it works. I was trying with other directory structures but never works.

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Great.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.