0

I'm trying to run some code on Python 2.7 to work on a CSV data set.

import numpy as np
import pandas as pd

url = "https://www.stats.govt.nz/assets/Uploads/Injury-statistics/Injury-statistics-work-related-claims-2018/Download-data/injury-statistics-work-related-claims-2018-csv.csv"

df = pd.read_csv(url)

For some reason, I keep getting this error :

urllib2.URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>

How can I solve this?

  • I'm able to run it, by giving `encoding='unicode-escape'`, can you download that csv and try with the file name and see if that works? – NYC Coder Jun 23 '20 at 17:07
  • 2
    Does this answer your question? [ssl.SSLError: tlsv1 alert protocol version](https://stackoverflow.com/questions/44316292/ssl-sslerror-tlsv1-alert-protocol-version) – NYC Coder Jun 23 '20 at 17:11
  • @NYC Coder Still getting the same error with the statement encoding='unicode-escape' – akum_7102 Jun 23 '20 at 17:16

0 Answers0