hajimes/mmh3

SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

cryoco opened this issue · 2 comments

cryoco commented

Hi, I got this error under python 3.10

Python 3.10.10 (main, Mar 21 2023, 18:45:11) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mmh3
>>> a=mmh3.hash("abc", 1234)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
>>>

Any solution or code hacking?

Hi, could you check the version of the installed mmh3?

As far as I'm concerned, version 2.3.2 or older may cause such an error in Python 3.10 or newer. If the version of mmh3 is newer than that, it should be a bug and I'll try to fix it as soon as possible.