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

Does not work with pypy #20

@adrian-vlad

Description

@adrian-vlad

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions