Skip to content

Commit c064572

Browse files
committed
Label needs to be encoded
1 parent 371d9f5 commit c064572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncgpio/gpio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __enter__(self):
3737
if self._label is None:
3838
self._chip = gpio.lib.gpiod_chip_open_by_number(self._num)
3939
else:
40-
self._chip = gpio.lib.gpiod_chip_open_by_label(self._label)
40+
self._chip = gpio.lib.gpiod_chip_open_by_label(self._label.encode("utf-8"))
4141
if self._chip == gpio.ffi.NULL:
4242
raise OSError("unable to open chip")
4343
return self

0 commit comments

Comments
 (0)