Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Does not work with pypy #20

Open
adrian-vlad opened this issue Aug 1, 2021 · 0 comments
Open

Does not work with pypy #20

adrian-vlad opened this issue Aug 1, 2021 · 0 comments

Comments

@adrian-vlad
Copy link

Hi, I tried running the test code with pypy and it doesn't work.

pi@raspberrypi:/usr/local/lib/python3.9/dist-packages $ pypy3 -m gpiod.test.blink 0 7
Traceback (most recent call last):
  File "/usr/lib/pypy3/lib-python/3/runpy.py", line 196, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/pypy3/lib-python/3/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/dist-packages/gpiod/test/blink.py", line 20, in <module>
    c = chip(LED_CHIP)
  File "/usr/local/lib/python3.9/dist-packages/gpiod/libgpiodcxx/__init__.py", line 105, in __init__
    self.open(device, how)
  File "/usr/local/lib/python3.9/dist-packages/gpiod/libgpiodcxx/__init__.py", line 134, in open
    chip_struct = func(device)
  File "/usr/local/lib/python3.9/dist-packages/gpiod/libgpiod/__init__.py", line 1132, in gpiod_chip_open_lookup
    return gpiod_chip_open_by_number(descr)
  File "/usr/local/lib/python3.9/dist-packages/gpiod/libgpiod/__init__.py", line 1086, in gpiod_chip_open_by_number
    return gpiod_chip_open("/dev/gpiochip" + str(num))
  File "/usr/local/lib/python3.9/dist-packages/gpiod/libgpiod/__init__.py", line 123, in gpiod_chip_open
    status = ioctl(fd, GPIO_GET_CHIPINFO_IOCTL, info)
OverflowError: int too large to convert to int
pi@raspberrypi:/usr/local/lib/python3.9/dist-packages $ pypy3
Python 3.7.10 (7.3.5+dfsg-2, Jun 24 2021, 05:25:12)
[PyPy 7.3.5 with GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>>

Works fine with regular python3.

Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant