Home > other >  How to fix TypeError: order must be str, not int
How to fix TypeError: order must be str, not int

Time:12-22

I am using 3rd party code to process some files, which is written in python. The erroring code is this:

outfile.writeframes(int16(output.ravel(1)*32767.0).tostring())

Not sure how I should be fixing it but this is running on Python 3.9.

CodePudding user response:

Looks like paulstretch or similar, this worked for me

outfile.writeframes(int16(output.ravel('F')*32767.0).tostring())

check: https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ravel.html#numpy.ravel

  • Related