Need assistance running a .py file without internet

Hello all - three years ago, I created a .py file using PsychoPy to display stimuli for my research study, and I’ve been using it successfully until today. Importantly, I have been executing this .py file without being connected to the internet, as I have to connect my computer to a device (for brain imaging) that has its own WiFi signal/network. Today, when I tried to run my .py file without internet, it crashed (gave a quick error message that my student managed to capture on their phone), and I haven’t been able to resolve the issue. The only line in the error message that seems useful is “Import Error: DLL load failed: The network path was not found.” Please note that my .py files reside on my computer itself, not on a network drive. I have updated Python to the most recent version and attempted to use a Standalone version of PsychoPy (all downloaded to the computer), but I don’t know what else to try. I have also confirmed that my.py file runs without issue when I am connected to the internet. I’ve tried finding information online to see if I’m missing software or something else needed to execute my file while disconnected from the internet, but I haven’t found anything useful. If anyone has any ideas or suggestions, I would really appreciate it, as I’m scheduled to be collecting data all week. Thank you in advance!

It seems, to me, that your .py script is trying to pull a dependency that is not local to the machine (an import statement perhaps).

If you spend just 10 minuets or so reading some of the posts here, you’ll get a very good understanding of what is required in order that others may be able to offer you some constructive advice.

Thanks Rob. I think you’re correct in your understanding of the issue. I learned this morning that when I recently updated software on my computer it updated Python libraries (I think this is the correct term) which eliminated the dependency (also hope this is the right term) that I needed to execute my .Py file. There’s no easy solution as I need the new software and to run my .Py files, but I found a workaround. I just discovered that I could launch PsychoPy while disconnected from the internet and launch my .Py file from there; fortunately this successfully interfaces with the new software as well. It’s clunky, but it works!

You are very welcome and I’m pleased that you’ve discovered the issue as it serves as a learning point.

I follow some of the development and security news covering systems infrastructure (hardware and software) and if I’m honest, it’s very unnerving when one knows just how fragile the systems upon which our modern society is built, are – one seemingly small change can and does have major implications.

Be safe.

Peace.