Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New TypeError introduced in v2.11.2 #76

Closed
mikeysklar opened this issue Jun 6, 2023 · 0 comments · Fixed by #77
Closed

New TypeError introduced in v2.11.2 #76

mikeysklar opened this issue Jun 6, 2023 · 0 comments · Fixed by #77

Comments

@mikeysklar
Copy link

mikeysklar commented Jun 6, 2023

This error was generated on:

The Adafruit_EPD releases v2.11.3 and v2.11.2 generate this error, but earlier releases work fine.

(.venv) pi@pi2b:~/e-ink-bonnet_2_13 $ python3 example_1.py
Traceback (most recent call last):
File "/home/pi/e-ink-bonnet_2_13/example_1.py", line 4, in <module>
from adafruit_epd.epd import Adafruit_EPD
File "/home/pi/e-ink-bonnet_2_13/.venv/lib/python3.9/site-packages/adafruit_epd/epd.py", line 32, in <module>
class Adafruit_EPD: # pylint: disable=too-many-instance-attributes, too-many-public-methods, too-many-arguments
File "/home/pi/e-ink-bonnet_2_13/.venv/lib/python3.9/site-packages/adafruit_epd/epd.py", line 250, in Adafruit_EPD
def set_black_buffer(self, index: Union[0, 1], inverted: bool) -> None:
File "/usr/lib/python3.9/typing.py", line 268, in inner
return func(*args, **kwds)
File "/usr/lib/python3.9/typing.py", line 345, in __getitem__
return self._getitem(self, parameters)
File "/usr/lib/python3.9/typing.py", line 456, in Union
parameters = tuple(_type_check(p, msg) for p in parameters)
File "/usr/lib/python3.9/typing.py", line 456, in <genexpr>
parameters = tuple(_type_check(p, msg) for p in parameters)
File "/usr/lib/python3.9/typing.py", line 157, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: Union[arg, ...]: each arg must be a type. Got 0. 

Steps to reproduce:

import digitalio
import busio
import board
from adafruit_epd.epd import Adafruit_EPD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant