如何解决 iPython 笔记本中的“无法打开文件(截断文件)”错误

问题描述 投票:0回答:1

我正在尝试效仿 brain observatory ipython 笔记本的示例。

但是,我在加载

nwb
文件时遇到了困难,如下所示。

from allensdk.core.brain_observatory_cache import BrainObservatoryCache
boc = BrainObservatoryCache(manifest_file='boc/manifest.json')

data_set = boc.get_ophys_experiment_data(501940850)  # problem here

所以,我通过

HDFview
打开了nwb文件。

除了

nwb
之外,所有脑观测站
502376461.nwb
的文件都没有打开。

它引发了以下错误:

IOError:无法打开文件(截断的文件:eof = 82280448,sblock->base_addr = 0,stored_eoa = 204046519)

当我尝试打开 allen 的 ipython 笔记本示例中的

502376461.nwb
时,它成功了!但其他人(
501940850
503820068
...)像上面一样失败了。

python validation ipython neuron-simulator allen-sdk
1个回答
3
投票

总结来自 github 的线程:

https://github.com/AllenInstitute/AllenSDK/issues/22

文件已部分下载或以某种方式损坏。下载过程中没有报告异常,所以urllib一定没有注意到问题。

AllenSDK 开发人员正在研究某种文件一致性检查和/或不同的 HTTP 库。

https://github.com/AllenInstitute/AllenSDK/issues/28

如果其他人遇到这种情况,您可以删除坏文件并重新运行下载功能(

BrainObservatoryCache.get_ophys_experiment_data
)。文件被下载到 BrainObservatoryCache manifest file 的子目录中,如果未指定,则默认为当前工作目录。

© www.soinside.com 2019 - 2024. All rights reserved.