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

Python Binding broken in Python 3.10 (PY_SSIZE_T_CLEAN macro required #635

Closed
FlorianReimold opened this issue Apr 26, 2022 · 0 comments · Fixed by #637
Closed

Python Binding broken in Python 3.10 (PY_SSIZE_T_CLEAN macro required #635

FlorianReimold opened this issue Apr 26, 2022 · 0 comments · Fixed by #637
Assignees
Labels
bug Something isn't working
Milestone

Comments

@FlorianReimold
Copy link
Member

Issue

When Executing the python samples on Ubuntu 22.04 the following error comes up:

python3 person_snd.py 
eCAL v5.8.18 (2022-02-23 17:19:52 +0100)

Traceback (most recent call last):
  File "/usr/share/ecal/samples/python/person_snd/person_snd.py", line 67, in <module>
    main()  
  File "/usr/share/ecal/samples/python/person_snd/person_snd.py", line 40, in main
    pub = ProtoPublisher("person", person_pb2.Person)
  File "/usr/lib/python3/dist-packages/ecal/core/publisher.py", line 90, in __init__
    super(ProtoPublisher, self).__init__(name, topic_type, topic_desc)
  File "/usr/lib/python3/dist-packages/ecal/core/publisher.py", line 40, in __init__
    self.c_publisher = ecal_core.publisher(name, topic_type, topic_descriptor)
  File "/usr/lib/python3/dist-packages/ecal/core/core.py", line 573, in __init__
    self.thandle = pub_create(self.tname, self.ttype, self.tdesc)
  File "/usr/lib/python3/dist-packages/ecal/core/core.py", line 165, in pub_create
    pub_set_description(topic_handle, topic_desc)
  File "/usr/lib/python3/dist-packages/ecal/core/core.py", line 187, in pub_set_description
    return _ecal.pub_set_description(topic_handle, description)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

Test System

  • Ubuntu 22.04
  • Python 3.10
  • eCAL 5.8.18

Links

@FlorianReimold FlorianReimold added the bug Something isn't working label Apr 26, 2022
@FlorianReimold FlorianReimold added this to the eCAL 5.10 milestone Apr 26, 2022
@FlorianReimold FlorianReimold changed the title Python Binding broken in Python 3.10 Python Binding broken in Python 3.10 (PY_SSIZE_T_CLEAN macro required Apr 26, 2022
rex-schilasky added a commit that referenced this issue Apr 27, 2022
FlorianReimold pushed a commit that referenced this issue Apr 28, 2022
FlorianReimold pushed a commit that referenced this issue Apr 28, 2022
FlorianReimold added a commit that referenced this issue Apr 28, 2022
* PY_SSIZE_T_CLEAN add before including Python.h (needed since python 3.10 when using s# or y#) - should fix #635

* Python: Replaced int in Python parsing by Py_ssize_t

Co-authored-by: Florian Reimold <[email protected]>
FlorianReimold added a commit that referenced this issue Apr 28, 2022
* PY_SSIZE_T_CLEAN add before including Python.h (needed since python 3.10 when using s# or y#) - should fix #635

* Python: Replaced int in Python parsing by Py_ssize_t

Co-authored-by: rex-schilasky <[email protected]>
FlorianReimold added a commit that referenced this issue Apr 28, 2022
* PY_SSIZE_T_CLEAN add before including Python.h (needed since python 3.10 when using s# or y#) - should fix #635

* Python: Replaced int in Python parsing by Py_ssize_t

Co-authored-by: rex-schilasky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants