SSL Certificate error Synapse Analytics

holmaq 1 Reputation point
2021-03-02T09:25:08.287+00:00

Hi, when trying to read an excel file from ADLS Gen2 with synapse notebook and pandas i recieve the following error:

URLError : <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)> Traceback (most recent call last): File "/home/trusted-service-user/cluster-env/env/lib/python3.6/site-packages/pandas/util/_decorators.py", line 208, in wrapper return func(*args, **kwargs) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/site-packages/pandas/io/excel/_base.py", line 310, in read_excel io = ExcelFile(io, engine=engine) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/site-packages/pandas/io/excel/_base.py", line 819, in init self._reader = self._enginesengine File "/home/trusted-service-user/cluster-env/env/lib/python3.6/site-packages/pandas/io/excel/_xlrd.py", line 21, in init super().init(filepath_or_buffer) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/site-packages/pandas/io/excel/_base.py", line 348, in init filepath_or_buffer = BytesIO(urlopen(filepath_or_buffer).read()) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/urllib/request.py", line 544, in _open '_open', req) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/urllib/request.py", line 1392, in https_open context=self._context, check_hostname=self._check_hostname) File "/home/trusted-service-user/cluster-env/env/lib/python3.6/urllib/request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>

When running the same code locally from my machine, there's no issues. Code: import pandas as pd ReadExcel=pd.read_excel('https://datalake2devjohan.dfs.core.windows.net/testdata/Korttidsplatser.xlsx****?saskey****') print(ReadExcel) I've seen other examples where this is possible. Thank you.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,367 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,362 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chandana Basani 1 Reputation point Microsoft Employee
    2021-07-22T01:47:00.117+00:00

    I responded as requested. Sent an email with details to azcommunity[at]microsoft[dot]com

    Can you please clarify if this was resolved? Facing the exact same issue.

    0 comments No comments