Closed qxpBlog closed 10 months ago
Hi @qxpBlog , thanks for using CodeCarbon. Could you give a little more context, how are you running code carbon ? Do you use a .codecarbon.config
file ? You seem to be trying to use the API, right ?
Hi @qxpBlog , thanks for using CodeCarbon. Could you give a little more context, how are you running code carbon ? Do you use a
.codecarbon.config
file ? You seem to be trying to use the API, right ?
i have solved this problem,the problem is with my net work
@dsblank @Lothiraldan @ndevenish @mp15 @guylifshitz my program has a problem as following, what is wrong with it?
[codecarbon ERROR @ 09:13:54] HTTPSConnectionPool(host='api.codecarbon.io', port=443): Read timed out. (read timeout=2) Traceback (most recent call last): File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request self._validate_conn(conn) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1096, in _validate_conn conn.connect() File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connection.py", line 642, in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connection.py", line 782, in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( File "/home/iotsc01/anaconda3/envs/xinpengqenv/lib/python3.10/site-packages/urllib3/util/ssl.py", line 470, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) File "/home/iotsc01/anaconda3/envs/xinpengqenv/lib/python3.10/site-packages/urllib3/util/ssl.py", line 514, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/ssl.py", line 1104, in _create self.do_handshake() File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/ssl.py", line 1375, in do_handshake self._sslobj.do_handshake() TimeoutError: _ssl.c:990: The handshake operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 844, in urlopen retries = retries.increment( File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/util/retry.py", line 470, in increment raise reraise(type(error), error, _stacktrace) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/util/util.py", line 39, in reraise raise value File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 790, in urlopen response = self._make_request( File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request raise new_e File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 469, in _make_request self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 370, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.codecarbon.io', port=443): Read timed out. (read timeout=2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/codecarbon/core/api_client.py", line 92, in add_emission r = requests.post(url=url, json=payload, timeout=2) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/home/iotsc01/anaconda3/envs/xinpengq_env/lib/python3.10/site-packages/requests/adapters.py", line 532, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.codecarbon.io', port=443): Read timed out. (read timeout=2)