Broken link to dataset in Linear Regression project

Probably there is a broken link to dataset in Linear Regression project “Honey Production”.

Trying to load dataset with a given link (is already in code editor at the beginning of project) results with this output:

Traceback (most recent call last):
File "script.py", line 7, in <module>
    df = pd.read_csv("https://content.codecademy.com/programs/data-science-path/linear_regression/honeyproduction.csv")
  File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 685, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py", line 440, in _read
    filepath_or_buffer, encoding, compression
  File "/usr/local/lib/python3.6/dist-packages/pandas/io/common.py", line 196, in get_filepath_or_buffer
    req = urlopen(filepath_or_buffer)
  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 532, in open
    response = meth(req, response)
  File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.6/urllib/request.py", line 570, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
2 Likes

Instead of that link, try this one:
https://s3.amazonaws.com/codecademy-content/programs/data-science-path/linear_regression/honeyproduction.csv

But I’ve found the project and the link works for me, hope for you as well! a 403 http error means that you were forbidden to access that file. Maybe region limitations or a server issue. :smiley:

Instead of that link, try this one:
https://s3.amazonaws.com/codecademy-content/programs/data-science-path/linear_regression/honeyproduction.csv