ssd1306py-micropython icon indicating copy to clipboard operation
ssd1306py-micropython copied to clipboard

OSError: [Errno 2] ENOENT

Open woodgreat opened this issue 2 years ago • 4 comments

in main.py ...

line 16> lcd.text('font16x16', 0, 4, 16) ...


MPY: soft reboot Warning: I2C(-1, ...) is deprecated, use SoftI2C(...) instead Traceback (most recent call last): File "", line 16, in File "/lib/ssd1306py/ops.py", line 66, in text File "/lib/ssd1306py/ascii16.py", line 36, in display File "/lib/ssd1306py/ascii16.py", line 15, in _get_ch OSError: [Errno 2] ENOENT


I checked ascii16.py


    _file = open(sys.path[1] + '/ssd1306py/ascii16.txt', 'r')

why error came?

woodgreat avatar Jul 13 '23 05:07 woodgreat

Try to change to: _file = open('/ssd1306py/ascii16.txt', 'r')

treysis avatar Nov 14 '23 12:11 treysis

Try to change to: _file = open('/ssd1306py/ascii16.txt', 'r')

it works when i try : _file = open('/lib/ssd1306py/ascii16.txt', 'r')

sarakii avatar Dec 21 '23 14:12 sarakii

True. Depends on where you put your folder. But this font is very slow. Better to use another one.

treysis avatar Dec 21 '23 16:12 treysis

in main.py ...

line 16> lcd.text('font16x16', 0, 4, 16) ...

MPY: soft reboot Warning: I2C(-1, ...) is deprecated, use SoftI2C(...) instead Traceback (most recent call last): File "", line 16, in File "/lib/ssd1306py/ops.py", line 66, in text File "/lib/ssd1306py/ascii16.py", line 36, in display File "/lib/ssd1306py/ascii16.py", line 15, in _get_ch OSError: [Errno 2] ENOENT

I checked ascii16.py

    _file = open(sys.path[1] + '/ssd1306py/ascii16.txt', 'r')

why error came?

You can also change it to sys.path[2], which would also make it work

letr007 avatar Apr 30 '24 15:04 letr007