farmOS / farmOS.py

A Python library for interacting with farmOS over API.
GNU General Public License v3.0
27 stars 12 forks source link

Pyton urllib3.exceptions.NewConnectionError thrown when called at startup #36

Closed Skipper-is closed 3 years ago

Skipper-is commented 4 years ago

Just trying to run FarmOS.py from a Raspberry Pi. If I call the script to run at boot, I get a NewConnectionError thrown, assuming that it is being called before the network adapter is available. Does it need a try/catch? Or maybe I should just run it a few seconds after boot....

paul121 commented 4 years ago

@Skipper-is interesting, yea I would say trying to run it a few seconds after boot. But even then you might need a try/catch loop.. hmm..

Maybe you could have a loop in a bash script that waits for network availability (using some command to ask the OS) and run your python script afterwards?

paul121 commented 3 years ago

@Skipper-is I'm going to close this but feel free to open again if you think it is an issue with farmOS.py.

Curious what the solution was if you found one!