adafruit / Adafruit_CircuitPython_framebuf

CircuitPython framebuf module, based on the Python framebuf module
MIT License
39 stars 36 forks source link

'font5x8.bin' FileNotFoundError #28

Closed yeyeto2788 closed 4 years ago

yeyeto2788 commented 4 years ago

Hey guys!

I was trying out the https://github.com/adafruit/Adafruit_CircuitPython_PCD8544 lib specifically this (https://github.com/adafruit/Adafruit_CircuitPython_PCD8544/blob/master/examples/pcd8544_simpletest.py) and I just encounter this issues which seems to be already discussed on #11 but I guess the option will be to include it on the setup.py and we can segregate in which platform can be included or not.

Options for the setup.py in the setup function call:

setup(...,
      packages=['mypkg'],
      package_dir={'mypkg': 'src/mypkg'},
      package_data={'mypkg': ['data/*.dat']},
      )

Traceback error logs:

Traceback (most recent call last):
  File "lcd_test.py", line 63, in <module>
    display.text('hello world', 0, 0, 1)
  File "/usr/local/lib/python3.7/dist-packages/adafruit_framebuf.py", line 344, in text
    self._font = BitmapFont()
  File "/usr/local/lib/python3.7/dist-packages/adafruit_framebuf.py", line 398, in __init__
    self._font = open(self.font_name, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'font5x8.bin'

If you think that is should be an issue of the Adafruit_CircuitPython_PCD8544 lib, let me know and I'll create the issue there.

Regards.

ladyada commented 4 years ago

hi it has to be in the directory where you run the script, it isnt an issue with setup.py https://learn.adafruit.com/nokia-5110-3310-monochrome-lcd/circuitpython-usage#text-9-23 thanx!