Micropython error codes (and definitions) for the ESP32 MCU

Micropython Programming: Error Codes

Micropython is a complete sub-set of the Python 3 programming language. Designed for ease of use on microcontrollers, it can be used as an operating system for the advanced ESP32 microcontroller.

The ESP32 with Micropython is a small but complete computing system, and we often refer to it as a microprocessor rather than just a microcontroller. It actually has an operating system that allows you to create/delete directories and files.

We have created educational kits for using Micropython with the ESP32 MCU, with a blind motor (or window opener, or low voltage relay modules) that you can use in your home. This is a great gift for anyone interested in learning how to use the ESP32. Please see the links at the bottom of this page for more info.

The table below displays a list of Micropython error codes, with a description of the meaning of each code. These error codes can be trapped so that the python script doesn't crash (see start_data_MQTT for a good example of this).

Micropython OS Error Codes

This page displays a list of Micropython error codes that are specific to this device. If you have a different board there may be some slight variations.

Use CTRL-f to find the code you need in this page ...

Key: 1
Code: EPERM
Meaning: Operation not permitted
---
Key: 2
Code: ENOENT
Meaning: No such file or directory
---
Key: 110
Code: ETIMEDOUT
Meaning: Connection timed out
---
Key: 22
Code: EINVAL
Meaning: Invalid argument
---
Key: 111
Code: ECONNREFUSED
Meaning: Connection refused
---
Key: 5
Code: EIO
Meaning: I/O error
---
Key: 113
Code: EHOSTUNREACH
Meaning: No route to host
---
Key: 95
Code: EOPNOTSUPP
Meaning: Operation not supported on transport endpoint
---
Key: 114
Code: EALREADY
Meaning: Operation already in progress
---
Key: 9
Code: EBADF
Meaning: Bad file number
---
Key: 98
Code: EADDRINUSE
Meaning: Address already in use
---
Key: 11
Code: EAGAIN
Meaning: Try again
---
Key: 12
Code: ENOMEM
Meaning: Out of memory
---
Key: 13
Code: EACCES
Meaning: Permission denied
---
Key: 115
Code: EINPROGRESS
Meaning: Operation now in progress
---
Key: 103
Code: ECONNABORTED
Meaning: Software caused connection abort
---
Key: 104
Code: ECONNRESET
Meaning: Connection reset by peer
---
Key: 17
Code: EEXIST
Meaning: File exists
---
Key: 105
Code: ENOBUFS
Meaning: No buffer space available
---
Key: 19
Code: ENODEV
Meaning: No such device
---
Key: 107
Code: ENOTCONN
Meaning: Transport endpoint is not connected
---
Key: 21
Code: EISDIR
Meaning: Is a directory
---

You can purchase educational kits for blinds and window openers, and our control products in our online DIY automation store.

Stay tuned, if you're interested; we are taking the journey into IoT and automation, writing about every step we take!

Adrian Biffen
Senior Partner
RollerTrol Automation Systems

We sincerely hope you enjoy our advanced technology products; if you have any questions, please contact us at any time!

Articles in this series:

Part 1: Micropython for the ESP32: Connecting to Your WiFi Router Network

Part 2: Micropython for the ESP32 Microcontroller: REPL Communications

Part 3: Micropython for the ESP32: FTP Fast File Transfer

Part 4: Micropython for the ESP32: Pre-loaded Programs

Part 5: Micropython for the ESP32: DC Motor Reversing Switch

Part 6: Micropython for the ESP32: WiFi Blind Motor Educational Kit Components

Part 7: Micropython for the ESP32: Error Codes and Definitions (you are here)