qiuqiangkong / sampleRNN_acoustic_scene_generation

Other
13 stars 3 forks source link

Cannot load file containing pickled data when allow_pickle=False #5

Closed ghost closed 5 years ago

ghost commented 5 years ago

After validation, when testing, there is an error :

Traceback (most recent call last):
  File "two_tier_spkdird.py", line 644, in <module>
    test_cost, test_time = monitor(test_feeder)
  File "two_tier_spkdird.py", line 543, in monitor
    _data_feeder = load_data(data_feeder)
  File "two_tier_spkdird.py", line 197, in load_data
    Q_TYPE
  File "/home/vincent/sampleRNN_acoustic_scene_generation/datasets/dataset.py", line 325, in audio_test_feed_epoch
    files_data = numpy.load(data_path)
  File "/home/vincent/miniconda2/lib/python2.7/site-packages/numpy/lib/npyio.py", line 451, in load
    raise ValueError("Cannot load file containing pickled data "
ValueError: Cannot load file containing pickled data when allow_pickle=False

Tested with numpy 1.16.3 and 1.16.4, same result

qiuqiangkong commented 5 years ago

The code is based on python 2. Are you using python 3?

Best wishes,

Qiuqiang


From: VincentMatter notifications@github.com Sent: 13 August 2019 01:10 To: qiuqiangkong/sampleRNN_acoustic_scene_generation sampleRNN_acoustic_scene_generation@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [qiuqiangkong/sampleRNN_acoustic_scene_generation] Cannot load file containing pickled data when allow_pickle=False (#5)

After validation, when testing, there is an error :

Traceback (most recent call last): File "two_tier_spkdird.py", line 644, in test_cost, test_time = monitor(test_feeder) File "two_tier_spkdird.py", line 543, in monitor _data_feeder = load_data(data_feeder) File "two_tier_spkdird.py", line 197, in load_data Q_TYPE File "/home/vincent/sampleRNN_acoustic_scene_generation/datasets/dataset.py", line 325, in audio_test_feed_epoch files_data = numpy.load(data_path) File "/home/vincent/miniconda2/lib/python2.7/site-packages/numpy/lib/npyio.py", line 451, in load raise ValueError("Cannot load file containing pickled data " ValueError: Cannot load file containing pickled data when allow_pickle=False

Tested with numpy 1.16.3 and 1.16.4, same result

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fqiuqiangkong%2FsampleRNN_acoustic_scene_generation%2Fissues%2F5%3Femail_source%3Dnotifications%26email_token%3DADFXTSNVKE2XPACWMOCC5LLQEH3XDA5CNFSM4ILF7BX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HE2XRRA&data=02%7C01%7Cq.kong%40surrey.ac.uk%7C0a075f01bbdb43848a7608d71f82a58d%7C6b902693107440aa9e21d89446a2ebb5%7C0%7C0%7C637012518302287292&sdata=z2V2cnjp%2Fu%2B3vtuXa2syc8LEeH6lWdxgmOjenn4rrME%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADFXTSLPE7KK52PEODAJLUDQEH3XDANCNFSM4ILF7BXQ&data=02%7C01%7Cq.kong%40surrey.ac.uk%7C0a075f01bbdb43848a7608d71f82a58d%7C6b902693107440aa9e21d89446a2ebb5%7C0%7C0%7C637012518302287292&sdata=8hqeNycGbzxnCVSpr%2FUtlgpO2yXdiqiqaDKEy7pFBP8%3D&reserved=0.

ghost commented 5 years ago

No, I'm using python 2. I suppose I'm using a more recent version of numpy than you, since the default value of "allow_pickle" in numpy.load() has recently been changed from True to False. I have changed the value of the boolean, I will tell you if this solution worked.

ghost commented 5 years ago

Nevermind, my file audio_test.npz was corrupted ! Sorry for the trouble.