Publication Feedback
Closed this issue ยท 13 comments
What did you enjoy about the eBook?
A great introductory textbook -- using it for my class
Did you find a typo, inconsistency, or error?
The HYMOD notebook doesn't run.
Specifically, in the first notebook the input data file doesn't load.
BadZipFile Traceback (most recent call last)
/tmp/ipykernel_61/2804211546.py in <module>
10
11 # load example data
---> 12 msdbook.install_package_data()
13
14 # load the Leaf River HYMOD input file
/srv/conda/envs/notebook/lib/python3.7/site-packages/msdbook/install_supplement.py in install_package_data()
79 zen = InstallSupplement()
80
---> 81 zen.fetch_zenodo()
/srv/conda/envs/notebook/lib/python3.7/site-packages/msdbook/install_supplement.py in fetch_zenodo(self)
45 r = requests.get(data_link)
46
---> 47 with zipfile.ZipFile(BytesIO(r.content)) as zipped:
48
49 # extract each file in the zipped dir to the project
/srv/conda/envs/notebook/lib/python3.7/zipfile.py in __init__(self, file, mode, compression, allowZip64, compresslevel)
1256 try:
1257 if mode == 'r':
-> 1258 self._RealGetContents()
1259 elif mode in ('w', 'x'):
1260 # set the modified flag so central directory gets written
/srv/conda/envs/notebook/lib/python3.7/zipfile.py in _RealGetContents(self)
1323 raise BadZipFile("File is not a zip file")
1324 if not endrec:
-> 1325 raise BadZipFile("File is not a zip file")
1326 if self.debug > 1:
1327 print(endrec)
BadZipFile: File is not a zip file
Thanks @jdossgollin ! We will investigate this ASAP and get back to you with some info.
@jdossgollin I assume you are running these locally and not on Binder, correct?
I'm running on Binder
Great thanks, I'll take a look
Wow thanks! The URL I'm using is https://hub.gke2.mybinder.org/user/immm-sfa-msd_uncertainty_ebook-9chgx6kv/doc/tree/notebooks -- let me know if you need any other diagnostics.
Interestingly, I just re-ran and it worked.
Not sure what was going on but may not be worth much time on your end.
Sorry about that. I can try running it a few more times to see if it was a one-off or a regular issue.
When I go to https://notebooks.gesis.org/binder/jupyter/user/immm-sfa-msd_uncertainty_ebook-8x1menuv/doc/tree/notebooks/hymod.ipynb, which is linked from https://immm-sfa.github.io/msd_uncertainty_ebook/docs/html/4_sensitivity_analysis_diagnostic_and_exploratory_modeling.html, I can reproduce this error
@jdossgollin I believe this might have been a binder issue, but I am running a bunch of tests now to confirm. I'll let you know ASAP what I find out.
@jdossgollin after some further testing, it does seem to have been a binder issue. I am able to open all of the notebooks from the ebook links and run them to completion.
The issue you have raised is a good one because it shows inconsistency in the behavior of the ebook and an external service. I believe we will move to change the backend of these notebooks from binder to an AWS instance of Linux running JupyterHub. This should help with the preload of data and performance as well. I'll keep this issue open until we get this setup.
Thanks for the valuable feedback!
It's very cool that this book project has your support on the back end, and always happy to contribute to OSS in the limited ways I can
Thanks @jdossgollin !
Hi @jdossgollin we now have the notebooks hosted on AWS and performance seems to be much better. I'll close this now, but reach out anytime. Thanks for your feedback!