Hi, could you provide more details on this? How does your script for storing QVD look like? Isn't the QVD file opened (ore used by other app) when you are trying to load it? Do you store it in the same location from where are you trying to load it?
Error: Cannot open file: 'lib://QVD Warehouse/NEW_DB_EnergyDataL5_converted.qvd' (Native Path: ***
2018-11-29 23:38:05 System error: ***)
Than it is deffinitely because of another app is using this QVD (loading or saving). Try also to remove sleep statement which I thing could cause troubles as well (it freeze app) and I don't see a reason for it.
Are you using QS Enterprise or Desktop? Could someone else use it? Can you see stored file in folder where you want it to have?
I am really sorry but it is very difficult to tell what is wrong such remotely. I never experienced something like what you are describing. Only one advice what can I provide is to 1) create new app and connection from scratch 2) reinstal Qlik