Hello, I have a site using dash/python 3.8 that ingests data from a small csv file and a larger (60M) netcdf file. It runs an update cycle that subsets these two files according to user-selected variables and/or time period, updating a map accordingly. The site is up and updates most of the time, however sometimes it does not respond to user selections. Some more clicking and control manipulation will cause it to update again, and then again it will stop update. The error log indicates a variable from the netcdf file (or the netcdf file itself) is not found, however it will then plot okay if the user continues manipulating the controls, so the file is found and the variable is extracted on some occasions.
It is live now; to have a look at it here is the login info:
https://atkinsonde.pythonanywhere.com/ datkinson QtPzU2bF
...and here is an error message that is written to the error log (this is for one of the netcdf variables, "shts", but it will also sometimes do it on the other variable in the netcdf file, "shww".)
File "/home/atkinsonde/mysite/app.py", line 254, in update_figure ecmwf_sw= pd.DataFrame(nco['shts'][single_date_pick].filled(fill_value=0)).set_index(latf) File "src/netCDF4/_netCDF4.pyx", line 4420, in netCDF4._netCDF4.Variable.__getitem__ File "src/netCDF4/_netCDF4.pyx", line 5363, in netCDF4._netCDF4.Variable._get File "src/netCDF4/_netCDF4.pyx", line 1950, in netCDF4._netCDF4._ensure_nc_success RuntimeError: No such file or directory
I've been thinking file size? But it's well below the 100M limit. Lag? But sometimes it updates quite promptly. File access? No, most of the time it reads the file. My app.run is embedded in main, as:
if __name__ == '__main__': app.run()
I can't figure out what it could be. Have I missed something obvious? I'm new to pythonanywhere and could easily have overlooked something, e.g. maybe I'm not launching the app correctly. An earlier iteration of the site, before the netcdf file was incorporated, worked fine . Thanks all.
[edit by admin: formatting]