Closed sd12832 closed 6 years ago
it's a known python3 pickle issue when loading pickled python2 files https://stackoverflow.com/questions/11305790/pickle-incompatibility-of-numpy-arrays-between-python-2-and-3
u = pickle._Unpickler(f)
u.encoding = 'latin1'
p = u.load()
return p
This is what I replaced the relevant code with.
I still got the error below:
Traceback (most recent call last):
File "separate_dsd.py", line 336, in <module>
main(sys.argv[1:])
File "separate_dsd.py", line 333, in main
train_auto(inputfile,outdir,model,0.3,30,25,32,513)
File "separate_dsd.py", line 276, in train_auto
sampleRate, audioObj = scipy.io.wavfile.read(filein)
File "/usr/local/lib/python3.6/site-packages/scipy/io/wavfile.py", line 236, in read
file_size, is_big_endian = _read_riff_chunk(fid)
File "/usr/local/lib/python3.6/site-packages/scipy/io/wavfile.py", line 168, in _read_riff_chunk
"understood.".format(repr(str1)))
ValueError: File format b'ID3\x04'... not understood.
I believe it's something to do with your encoding. What should I change the encoding to?
Wait a minute, the encoding was most definitely latin1
. But I guess the extra mp3 tags are making the system fail. How would I solve this?
you can't use it with mp3. must be wav. otherwise you have to change the file loader to something that supports mp3 like soundfile
Yeah, it all works now! Thank you for all your help.
Hey Sharan, if you could push the python3 changes to your fork (or submit it as a PR for a python3 branch of DeepConvSep), that would be awesome!
Yes! We can have a python3 branch maybe? You can do a pull request.
On Sat, Nov 17, 2018, 01:40 Evan Radkoff <notifications@github.com wrote:
Hey Sharan, if you could push the python3 changes to your fork (or submit it as a PR for a python3 branch of DeepConvSep), that would be awesome!
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/MTG/DeepConvSep/issues/19#issuecomment-439577004, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJva1t0JKubwdZ2ZZ11wVS-VLLD6xLmks5uv2kQgaJpZM4SmJuj .
I'll get a Python3 branch up and running tomorrow or day after!
loading pickle error is solved by this line params=pickle.load(f,encoding="latin1")
Not able to read the wav file using scipy I am getting the error as ValueError: File format b'<!DO'... not understood.
Trying to make DeepConvSep work for Python3, on my mac, seemed like a pretty simple task at the beginning. However, I reached an impasse at the point described below:
When I run the program with this command...
...I get the error
NameError: name 'file' is not defined
.file
has been replaced withopen
within Python3.Then I changed my code to:
However, I got the error:
Is there something up with your pickler? Can you please take a look at this? I want to help make a Python3 version of this code. I would be glad to help you along with this task.