3

using this:

import pandas as pd
url = "https://example.net/update/last7days?format=csv"

se7enDays = pd.read_csv(url)

results in this:

URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:646)> which i understand, but how can i load my cert AND pass the password to read_csv.

I had looked into using urllib2 but didn't have any joy passing the file AND password in.

Ideally something like this is what i would like:

cafile = "/Users/toast/ossim_cert.pem"
ossim_cert_pw = "mypassword"
se7enDays = pd.read_csv(url, cafile=cafile:ossim_cert_pw)
Anton Protopopov
  • 30,354
  • 12
  • 88
  • 93
toast
  • 582
  • 1
  • 6
  • 20

1 Answers1

1

I had the same problem but was able to overcome it by using:

    x = requests.get(url=url, certs= certs).content 
    pd.read_csv(io.StringIO(x.decode('utf8')))

This link helped: Pandas read_csv from url

Community
  • 1
  • 1
DirtyData
  • 11
  • 1