MetaCell / nwb-explorer

NWB Explorer is a web application to visualise and analyse the content of NWB:N 2 files
Other
23 stars 16 forks source link

Got "Error loading project Invalid project file." #274

Closed yarikoptic closed 2 years ago

yarikoptic commented 2 years ago

this integration used to work but seems "has stopped" (I guess we should add some integration testing).

on DANDI archive (e.g. visit page https://gui.dandiarchive.org/#/dandiset/000023/0.210914.1900/files?location=sub-541516760%2F and click on three dots icon available per file) where we direct visitor to nwbexplorer, pointing to nwb file url on our api server which redirects to S3, e.g.

http://nwbexplorer.opensourcebrain.org/nwbfile=https://api.dandiarchive.org/api/assets/95b266d2-7746-4845-80bc-7dbea747d7c4/download/

clicking on such link now leads me to http://nwbexplorer.opensourcebrain.org/user/ba6f5b0f-68a2-4d6f-a9b5-eae2d61beb14/97d2b0043705/geppetto which now says

Error loading project
Invalid project file. Double check the information you have entered and try again.

in the top right pane. nwbfile in ipython shell is also not available.

pgleeson commented 2 years ago

@yarikoptic Thanks for reporting. Checking this I see that some of the links in Dandisets work fine, e.g. https://gui.dandiarchive.org/#/dandiset/000004 loads fine, so I think the root of the issue is that some nwb files still simply don't load correctly in NWBE. There is a new release planned by @filippomc, and some of these issues should get resolved.

But yes, some automated testing of this would be wise to explicitly see which ones work and which don't. The issue with that really until now had been that some Dandisets are just too big to be within the scope of NWBE. By the way, (also for @bendichter @satra @oruebel), we've not forgotten about the pynwb streaming option. It would require some planning to change our back end handling of NWB files, as the assumption with NWBE (and particularly OSBv2 workspaces) is that the files reside locally. We'll try to get back to you soon about that.

satra commented 2 years ago

@pgleeson - just sent a PR. it may be as simple as that.

filippomc commented 2 years ago

Thanks @satra! Can test the new release candidate (including the pr above) here: http://35.226.194.155/

satra commented 2 years ago

@filippomc - i tried to load a file on this but it seems to have crashed it, now i can't restart it.

satra commented 2 years ago

@filippomc - the release candidate gives the same error on the url that @yarikoptic posted:

https://api.dandiarchive.org/api/assets/95b266d2-7746-4845-80bc-7dbea747d7c4/download/ https://dandiarchive.s3.amazonaws.com/blobs/4db/c6b/4dbc6bc8-f6cb-42db-ac6e-1426af22a5ce

both of the above are the same files. the first one is a redirect to the second.

filippomc commented 2 years ago

This is the error I can see in the logs:

ValueError: ('Error reading the NWB file.', ("Could not construct IntracellularElectrode object due to: IntracellularElectrode.init: incorrect type for 'description' (got 'bytes', expected 'str')",))

Looks like the file is not readable by pynwb. Will try update to pynwb 2.0.0 (now 1.3.0)

filippomc commented 2 years ago

Upgrade to 2.0.0 did fix that file, can try here: http://35.226.194.155/ The upgrade may have broken other files though, please let me know if you find anything weird

oruebel commented 2 years ago

ValueError: ('Error reading the NWB file.', ("Could not construct IntracellularElectrode object due to: IntracellularElectrode.init: incorrect type for 'description' (got 'bytes', expected 'str')",))

h5py changed its in behavior from reading strings as str in v2.x to reading strings as bytes in >v3.0. My guess is that this error could be due to the use of h5py 3.x with PyNWB 1.3. PyNWB 2.0 added support for hpy3.x.