-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'utils' #9
Comments
Looks like you didn't set up your path correctly. Please try to add the path in your system. Or if you only want to change the path within this Python session, try:
|
Thanks for your response!I can now successfully import the package.But when I run: data = utils.load_chinese_data()There is an URLError: |
URLError? can you print out the stack trace and see which URL is it requesting? |
gaierror Traceback (most recent call last) ~\anaconda3\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) ~\anaconda3\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) ~\anaconda3\lib\http\client.py in endheaders(self, message_body, encode_chunked) ~\anaconda3\lib\http\client.py in _send_output(self, message_body, encode_chunked) ~\anaconda3\lib\http\client.py in send(self, data) ~\anaconda3\lib\http\client.py in connect(self) ~\anaconda3\lib\http\client.py in connect(self) ~\anaconda3\lib\socket.py in create_connection(address, timeout, source_address) ~\anaconda3\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags) gaierror: [Errno 11004] getaddrinfo failed During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) E:\Jupyter File\nCov2019_analysis-master\src\utils.py in load_chinese_data() E:\Jupyter File\nCov2019_analysis-master\src\utils.py in load_chinese_raw() ~\anaconda3\lib\site-packages\pandas\io\parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) ~\anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds) ~\anaconda3\lib\site-packages\pandas\io\common.py in get_filepath_or_buffer(filepath_or_buffer, encoding, compression, mode) ~\anaconda3\lib\site-packages\pandas\io\common.py in urlopen(*args, **kwargs) ~\anaconda3\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) ~\anaconda3\lib\urllib\request.py in open(self, fullurl, data, timeout) ~\anaconda3\lib\urllib\request.py in _open(self, req, data) ~\anaconda3\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args) ~\anaconda3\lib\urllib\request.py in https_open(self, req) ~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) URLError: <urlopen error [Errno 11004] getaddrinfo failed> |
Can you copy the following link and paste into your web browser to see if you can read it? If not, then probably you have a firewall or something else blocking the link. Can you access GitHub in general? |
I can't read it in my browser,although i have aleady close my firewall.it's weird.I need to check my computer Settings.Thanks a lot! |
您好,我已经‘’pip install utils‘’,并且显示成功
Requirement already satisfied: utils in d:\python\lib\site-packages (1.0.1)
但是我在python notebook中试图import utils的时候,仍然报错,请问怎么解决呢
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import utils
ModuleNotFoundError: No module named 'utils'
The text was updated successfully, but these errors were encountered: