You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cases where there's problems downloading the chemical component files from PDB, corrupted or empty files are still saved producing difficult to understand errors down the line (see #702). Two things to fix:
do not store files if the download is empty or any kind of server error (404 or others)
better error handling when the file doesn't have valid content, trying a redownload
Activity
sbliven commentedon Sep 4, 2017
A simple check would be to re-download files if they are too small.
The smallest PDB file I could get BioJava to read is 79 bytes, which compresses to 47B with gzip.
The smallest CIF file I made is 384B, compressed 176B
An empty file compresses to 20B (just the header). Maybe set the threshold to about 40B to be safe?
josemduarte commentedon Sep 5, 2017
It seems that there's been a redirect in place at RCSB that did:
So it looks like biojava wasn't handling URL redirects correctly for this case. That'd be another fix we need to correct the caching problems.
sbliven commentedon Sep 5, 2017
@josemduarte Sounds like an opportunity to move FileDownloadUtils to nio.
josemduarte commentedon Sep 5, 2017
It seems that after all the redirect thing is not a bug but a feature. See https://stackoverflow.com/a/1884427/3914327
We will change the redirects at RCSB not to cross protocols for maximum compatibility.
josemduarte commentedon Sep 7, 2017
Since Wednesday the redirect from rcsb.org is from http to http. That should fix problems with any version before 4.2.8.
Solving biojava#704 and adding some tests for biojava#703
Re-download empty structure or chemical component structures
Add test for biojava#703
Make tests for biojava#703 fail with an assertion
Re-download empty structure or chemical component structures
Merge pull request #774 from sbliven/fix703
Fix biojava#933 URLConnection to invalid HTTP URL is not detected as …
Fix biojava#933 URLConnection to invalid HTTP URL is not detected as …