1

I've a report which uses Python script connector as a source. Below is the example of the code.

import requests
import json
import pandas as pd

authentication_url = "https://name.api.yyyymanager.com/Authentication/AuthorizeUser"

credentials = {
                "Username":"Sha******ya",
                "Password":"*********"
            }
response = requests.post(authentication_url,json=credentials)
token = str(response.content)[3:-2]

headers = {
            'Content-Type':'application/json',
            'Accept':'application/json',
            'X-RM12Api-ApiToken':token
        }

# Property Insurance
dataset_url = "https://name.api.yyyymanager.com/ReportWriterReports/218/RunReportWriterReport"
response = requests.get(url=dataset_url,headers=headers)
data = json.loads(response. Content)
property_insurance = pd.DataFrame(data['Rows'])
property_insurance = property_insurance[['name','Property Insurance Expiration']]

Using this script we get the data in power bi and based on it we create our visual.

Now when I deploy it in Power BI Service and try to schedule the refresh of the dataset I get the below error at the dataset setting page.

enter image description here

Shahab Haidar
  • 625
  • 3
  • 11
  • 25

1 Answers1

0

For security and privacy reasons, Python packages that provide client-server queries over the web in the service, aren't supported. Networking is blocked for such attempts.

See https://learn.microsoft.com/en-us/power-bi/connect-data/service-python-packages-support

Peter
  • 10,959
  • 2
  • 30
  • 47