Here is the code to reproduce it:
import pandas as pd
url = 'https://info.gesundheitsministerium.gv.at/data/timeline-faelle-bundeslaender.csv'
df = pd.read_csv(url)
it fails with the following traceback:
URLError: <urlopen error [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1129)>
Here is a link to check the url. The download works from the same browser, if you embed the link on a markdown cell in Jupyter.
Any ideas to make this "just work"?
Update:
as per the question suggested by Florin C. below,
This solution solves the issue when downloading via requests:
import requests
import urllib3
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS = 'ALL:@SECLEVEL=1'
requests.get(url)
It would be just a matter of forcing Pandas to to the same, somehow.
My Environment:
Python implementation: CPython
Python version : 3.9.7
IPython version : 7.28.0
requests : 2.25.1
seaborn : 0.11.2
json : 2.0.9
numpy : 1.20.3
plotly : 5.4.0
matplotlib: 3.5.0
lightgbm : 3.3.1
pandas : 1.3.4
Watermark: 2.2.0