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

module 'presentation.screens.epd2in7' has no attribute 'Epd2in7'

Open ppauly opened this issue 3 years ago • 2 comments

Getting this traceback with a Waveshare 2.7 inch e-Paper hat:

python3 ~/zero-btc-screen/main.py module 'presentation.screens.epd2in7' has no attribute 'Epd2in7' Traceback (most recent call last): File "/home/pi/zero-btc-screen/config/builder.py", line 17, in bind screen_class = getattr(package, screen.lower().capitalize()) AttributeError: module 'presentation.screens.epd2in7' has no attribute 'Epd2in7'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/zero-btc-screen/main.py", line 60, in main() File "/home/pi/zero-btc-screen/main.py", line 40, in main builder.bind(data_sink) File "/home/pi/zero-btc-screen/config/builder.py", line 27, in bind raise BtcConfigError( config.builder.BtcConfigError: Cannot instantiate epd2in7

ppauly avatar Jul 05 '22 17:07 ppauly

Changing Epd2in7v1 to Epd2in7 and changing the config mode to line allows me to finally see a display. Looks like someone was in the middle of changing the code.

Also the display was upside-down compared to the screenshots on the main page of the project.

ppauly avatar Jul 05 '22 18:07 ppauly

Hi @ppauly, very good find, thanks for the feedback! Unfortunately, I don't have a 2.7 display and cannot check it. Feel free to to create a pull request with your changes. As for the upside-down issue, I'm not confident I'm following but if it has to do with the rotation you can change it here: https://github.com/dr-mod/zero-btc-screen/blob/c9a439ec61c4dcd3ad40878906563f365501e54e/presentation/screens/epd2in7.py#L52

dr-mod avatar Jul 05 '22 20:07 dr-mod