zero-btc-screen icon indicating copy to clipboard operation
zero-btc-screen copied to clipboard

epd2in13_V2 Problem!

Open egomatic opened this issue 1 year ago • 7 comments

When i try to start python3 ~/zero-btc-screen/main.py console i showing:

Traceback (most recent call last): File "/home/BTH/zero-btc-screen/main.py", line 60, in main() File "/home/BTH/zero-btc-screen/main.py", line 40, in main builder.bind(data_sink) File "/home/BTH/zero-btc-screen/config/builder.py", line 23, in bind screen_class(observable=observable, **kwargs) File "/home/BTH/zero-btc-screen/presentation/screens/epd2in13v2.py", line 23, in init self.epd = self._init_display() ^^^^^^^^^^^^^^^^^^^^ File "/home/BTH/zero-btc-screen/presentation/screens/epd2in13v2.py", line 30, in _init_display epd = epd2in13_V2.EPD() ^^^^^^^^^^^ NameError: name 'epd2in13_V2' is not defined. Did you mean: 'Epd2in13v2'?

Pls Help me <3

egomatic avatar Jan 26 '25 00:01 egomatic

Hi @egomatic this looks like the drivers for the screen were not installed correctly. Try repeating these steps:

git clone https://github.com/waveshare/e-Paper.git ~/e-Paper
pip3 install ~/e-Paper/RaspberryPi_JetsonNano/python/

dr-mod avatar Jan 30 '25 23:01 dr-mod

I get:

pip3 install ~/e-Paper/RaspberryPi_JetsonNano/python/ error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.

sorry, i have no Idea what to do, how to use this virtual environment, .. can you help pls?

a6k avatar Feb 19 '25 15:02 a6k

what I testet:

python3 -m venv ~/env ~/env/bin/pip install ~/e-Paper/RaspberryPi_JetsonNano/python/ Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Processing ./e-Paper/RaspberryPi_JetsonNano/python Preparing metadata (setup.py) ... done Collecting Jetson.GPIO Downloading https://www.piwheels.org/simple/jetson-gpio/Jetson.GPIO-2.1.9-py3-none-any.whl (31 kB) Collecting Pillow Downloading pillow-11.1.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 778.3 kB/s eta 0:00:00 Installing collected packages: Jetson.GPIO, Pillow, waveshare-epd DEPRECATION: waveshare-epd is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 Running setup.py install for waveshare-epd ... done Successfully installed Jetson.GPIO-2.1.9 Pillow-11.1.0 waveshare-epd-0.0.0

~/env/bin/python ~/zero-btc-screen/main.py Traceback (most recent call last): File "/home/gent/zero-btc-screen/main.py", line 3, in import requests ModuleNotFoundError: No module named 'requests'

a6k avatar Feb 19 '25 15:02 a6k

I had the same problem when I tried using newer Debian 12 based Raspberry Pi OS Lite bookworm but if you go back to bullseye(Debian 11) it'll work

In Raspberry Pi imager Image

StephenR19 avatar Apr 10 '25 20:04 StephenR19

what I testet:

python3 -m venv ~/env ~/env/bin/pip install ~/e-Paper/RaspberryPi_JetsonNano/python/ Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Processing ./e-Paper/RaspberryPi_JetsonNano/python Preparing metadata (setup.py) ... done Collecting Jetson.GPIO Downloading https://www.piwheels.org/simple/jetson-gpio/Jetson.GPIO-2.1.9-py3-none-any.whl (31 kB) Collecting Pillow Downloading pillow-11.1.0-cp311-cp311-manylinux_2_28_aarch64.whl (4.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 778.3 kB/s eta 0:00:00 Installing collected packages: Jetson.GPIO, Pillow, waveshare-epd DEPRECATION: waveshare-epd is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559 Running setup.py install for waveshare-epd ... done Successfully installed Jetson.GPIO-2.1.9 Pillow-11.1.0 waveshare-epd-0.0.0

~/env/bin/python ~/zero-btc-screen/main.py Traceback (most recent call last): File "/home/gent/zero-btc-screen/main.py", line 3, in import requests ModuleNotFoundError: No module named 'requests'

Hey just curious, did you solve it?? If so, how?

jolenjolen avatar Jun 12 '25 11:06 jolenjolen

no, I have given up.

a6k avatar Jun 13 '25 05:06 a6k

Hi everyone, I have also this e-ink screen and I have the following error:

pi@btc-screen:~/zero-btc-screen $ python3 -u main.py
Traceback (most recent call last):
  File "main.py", line 62, in <module>
    main()
  File "main.py", line 48, in main
    data_sink.update_observers(prices)
  File "/home/pi/zero-btc-screen/presentation/observer.py", line 18, in update_observers
    observer.update(data)
  File "/home/pi/zero-btc-screen/presentation/screens/epd2in13v2.py", line 53, in update
    self.form_image(data, self.screen_draw)
  File "/home/pi/zero-btc-screen/presentation/screens/epd2in13v2.py", line 46, in form_image
    Plot.y_axis_labels(flatten_prices, FONT_SMALL, (0, 0), (38, 89), draw=screen_draw)
  File "/home/pi/zero-btc-screen/data/plot.py", line 34, in y_axis_labels
    draw.text((center_x(human_price), position_last[1] - i * y_step), human_price, font=font, fill=fill)
  File "/home/pi/zero-btc-screen/data/plot.py", line 22, in center_x
    text_width = draw.textlength(price, font)
AttributeError: 'ImageDraw' object has no attribute 'textlength'

My config:

[base]
console_logs             : false
#logs_file                : /tmp/zero-btc-screen.log
dummy_data               : false
refresh_interval_minutes : 15
# Price pair from Coinbase e.g. BTC-EUR or ADA-GBP
currency                 : BTC-USD

# Enabled screens or devices
screens : [
    epd2in13v2
#    epd2in13v3
#    epd2in13bv3
#    epd2in7
#    epd3in7
#    picture
#    inkyWhatRBW
  ]

# Configuration per screen
# This doesn't make any effect if screens are not enabled above
[epd2in13v2]
#mode : line
mode : candle

[epd2in13v3]
mode : candle

[epd2in13bv3]
mode : line

[epd2in7]
mode : candle

[epd3in7]
mode : candle

[picture]
filename : /home/pi/output.png
mode : candle

[inkyWhatRBW]
mode : candle

Any way to fix?

alex27riva avatar Nov 12 '25 18:11 alex27riva