• 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

MicroPython Programming with ESP32/ESP8266!"

Q&A Forum › Category: ESP8266 › MicroPython Programming with ESP32/ESP8266!"
0 Vote Up Vote Down
Dattatraya Apte asked 4 years ago

Dear Sir,
 
I was trying  “Send Sensor Readings via Email (IFTTT)” project for ESP8266 using micropython. I follwed the same procedure and same code as given by you. But I am getting the following error, when I upload, “boot.py”
Ready to download this file,please wait!
…………
download ok
exec(open(‘./boot.py’).read(),globals())
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “<string>”, line 4, in <module>
ImportError: no module named ‘urequests’
Regards
D. V. Apte

5 Answers
0 Vote Up Vote Down
Dattatraya Apte answered 4 years ago

Further to the above message, when I upload BME280.py I got folllowing message
Ready to download this file,please wait!
………………………………………………………………………
download ok
exec(open(‘BME280.py’).read(),globals())
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
MemoryError: memory allocation failed, allocating 2816 bytes

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
What’s the ESP8266 model that you are using?
Regards,
Sara

0 Vote Up Vote Down
Dattatraya Apte answered 4 years ago

Node MCU

0 Vote Up Vote Down
Dattatraya Apte answered 4 years ago

NODE MCU12 E

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.

When you get the following message:

Ready to download this file,please wait!
………………………………………………………………………
download ok
exec(open(‘BME280.py’).read(),globals())
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
MemoryError: memory allocation failed, allocating 2816 bytes

As long as you get the “download ok” message, the file was successfully saved to your board. The memory allocation is more like a warning rather than an error.

That file is a bit big, so the ESP8266 might run out of temporary memory. But as long as you see the “download ok” message, when it resets, it should have the complete file.

I’m not sure what happened to the urequest library. What’s the micropython distribution that you’re using?

I’ve tried the esp8266-20200911-v1.13 and didn’t get any error related with urequests.

However, I’ve found some people with the same issue here: https://forum.micropython.org/viewtopic.php?t=7212

I hope this helps.

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.