pybamm-team / PyBaMM

Fast and flexible physics-based battery models in Python
https://www.pybamm.org/
BSD 3-Clause "New" or "Revised" License
1.12k stars 548 forks source link

[Bug]: Error thrown when not connected to the internet #4580

Closed kratman closed 1 week ago

kratman commented 1 week ago

PyBaMM Version

develop

Python Version

all

Describe the bug

Due to the telemetry the following error is thrown when users are not connected to the internet:

error uploading: HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x15e8bfce0>: Failed to resolve 'us.i.posthog.com' ([Errno 8] nodename nor servname provided, or not known)"))

Steps to Reproduce

This can be re-produced by just disabling your internet connection when first importing PyBaMM with telemetry enabled.

kratman commented 1 week ago

This should be a quick fix. I will upload something in an hour or so