Any OSError Codes as of now?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 1
Joined: Sun Jun 23, 2019 12:00 pm

Any OSError Codes as of now?

Post by cahe » Sun Jun 23, 2019 12:12 pm

Hi team, is there any OSError code list with translation what each code implies? As that I feel the codes are not completed yet.


Posts: 166
Joined: Tue Nov 07, 2017 11:45 pm

Re: Any OSError Codes as of now?

Post by rhubarbdog » Mon Jun 24, 2019 3:31 pm

They are just text versions of the constants defined in file errno.h. micropython sticks to these eg ENODEV to remain lean.

If you need a translator to convert these to english you need to write a C program

User avatar
Posts: 2015
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Any OSError Codes as of now?

Post by jimmo » Tue Jun 25, 2019 12:28 am

Using regular CPython:

Code: Select all

>>> import os
>>> os.strerror(27)
'File too large'
These aren't included in MicroPython because it's just a lot of space to take up.

Post Reply