belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.32k stars 132 forks source link

Python 3.10 breaks SfPlayer #241

Closed michaelmariaott closed 10 months ago

michaelmariaott commented 2 years ago

When using Python 3.10, using the SfPlayer throws the following Error:

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

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/me/Documents/Pyo/learning_pyo.py", line 9, in <module>
    sf = p.SfPlayer("short_sample.wav", loop=True, mul=.5)
  File "/Users/me/.local/lib/python3.10/site-packages/pyo/lib/players.py", line 118, in __init__
    SfPlayer_base(
SystemError: <class '_pyo.SfPlayer_base'> returned a result with an exception set
bascouch commented 2 years ago

Any news ?

Same with Server.recstart()


SystemError Traceback (most recent call last) SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats

The above exception was the direct cause of the following exception:

SystemError Traceback (most recent call last) Input In [13], in <cell line: 144>() 140 clock.play() 143 s.recordOptions(filename=mainrecordstr,sampletype=1,dur=totaltime+1) --> 144 s.recstart() 146 ca = CallAfter(stopAll,totaltime+1) 147 end = CallAfter(shutDown,totaltime+5)

File /usr/local/lib/python3.10/site-packages/pyo/lib/server.py:970, in Server.recstart(self, filename) 967 self._fileformat = fileformat 968 self._server.recordOptions(self._dur, filename, self._fileformat, self._sampletype) --> 970 self._server.recstart(stringencode(filename))

SystemError: <method 'recstart' of '_pyo.Server' objects> returned a result with an exception set