SlightDust / HuoZiYinShua_HoshinoBot

适用于HoshinoBot的otto活字印刷插件
GNU General Public License v3.0
1 stars 1 forks source link

好像无法生成,报错Invalid combination of format, subtype and endian #1

Open cmdhb opened 7 months ago

cmdhb commented 7 months ago

[2024-01-15 10:51:38,248 nonebot] INFO: Message -1247439976 is ignored: Handled by Hoshino [2024-01-15 10:51:38,248] ERROR in msghandler: Invalid combination of format, subtype and endian Traceback (most recent call last): File "/root/pcrbot/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "/root/pcrbot/HoshinoBot/hoshino/modules/HuoZiYinShua_HoshinoBot/otto.py", line 45, in ottohzys b64audio = HZYS.export(txt,inYsddMode=True,reverse=reverse) File "/root/pcrbot/HoshinoBot/hoshino/modules/HuoZiYinShua_HoshinoBot/HuoZiYinShua/huoZiYinShua.py", line 138, in export base64_data = base64.b64encode(self.export().getvalue()) File "/root/pcrbot/HoshinoBot/hoshino/modules/HuoZiYinShua_HoshinoBot/HuoZiYinShua/huoZiYinShua.py", line 253, in export sf.write(bytesout, self.concatenated, _targetSR, format="MP3") File "/usr/local/lib/python3.8/dist-packages/soundfile.py", line 343, in write with SoundFile(file, 'w', samplerate, channels, File "/usr/local/lib/python3.8/dist-packages/soundfile.py", line 656, in init__ self._info = _create_info_struct(file, mode, samplerate, channels, File "/usr/local/lib/python3.8/dist-packages/soundfile.py", line 1479, in _create_info_struct info.format = _format_int(format, subtype, endian) File "/usr/local/lib/python3.8/dist-packages/soundfile.py", line 1437, in _format_int raise ValueError( ValueError: Invalid combination of format, subtype and endian

SlightDust commented 7 months ago

我这边一直没问题,还有什么复现条件吗,比如文字是什么,soundfile版本