It’s telling you that it can’t find a file at the path you specified. You probably want a relative path like static/data.dat (without the leading slash). With the slash, it’s going to be looking from the root of your filesystem, which is presumably not where the file is.
If you’re using a relative path, then you have to run the Python process from the same directory that your paths are relative to. So either change to that directory first in your terminal before running or use an absolute path, which is going to make your app more robust anyway.
If you still get that error with an absolute path, something weird is going on. I would then try and do a regular Python open() of the file as sanity check to make sure you can even read anything in.