NeuroKit
NeuroKit copied to clipboard
urllib.error.URLError: <urlopen error [Errno 11004] getaddrinfo failed>
I am interested in your code, but when i download data , it has error as follows
my python code :
Load NeuroKit and other useful packages
import neurokit2 as nk import numpy as np import pandas as pd print('nk.version(): ',nk.version())
Retrieve ECG data from data folder
ecg_signal = nk.data(dataset="ecg_1000hz")
results as follows:
-
OS: Windows (WindowsPE 64bit)
-
Python: 3.9.0
-
NeuroKit2: 0.2.3
-
NumPy: 1.23.5
-
Pandas: 1.5.3
-
SciPy: 1.10.0
-
sklearn: 1.2.1
-
matplotlib: 3.7.1 nk.version(): None Traceback (most recent call last): File "C:\Users\11024\anaconda3\envs\fam3d\lib\urllib\request.py", line 1342, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 1010, in _send_output self.send(msg) File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 950, in send self.connect() File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 1417, in connect super().connect() File "C:\Users\11024\anaconda3\envs\fam3d\lib\http\client.py", line 921, in connect self.sock = self._create_connection( File "C:\Users\11024\anaconda3\envs\fam3d\lib\socket.py", line 822, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "C:\Users\11024\anaconda3\envs\fam3d\lib\socket.py", line 953, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 11004] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\pyProject\ele_loc\FAM\r_detect.py", line 8, in
Process finished with exit code 1
Hi 👋 Thanks for reaching out and opening your first issue here! We'll try to come back to you as soon as possible. ❤️
This looks like an internet issue. Make sure you are connected to the internet when downloading the dataset (maybe disable VPN / firewall too?)
Did you manage to solve this?
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.