Forum Discussion
Abha
3 years agoFrequent Visitor
Power-bi: Python Requests package doesn't work on powerbi Service, throws module not found error.
Hi, We need to make API call using python script in powerbi, for which we needed to add python import requests package which works well in powerbi desktop but on powerbi service it gives "ModuleN...
Abha
3 years agoFrequent Visitor
Thanks for responding.
the urllib also gives error on service: urllib.error.URLError
Anonymous
3 years agoNot applicable
Hi Abha ,
Try it.
import urllib.request
url = "https://example.com/api/endpoint"
response = urllib.request.urlopen(url)
data = response.read().decode("utf-8")
Replace the url variable with the API endpoint you want to call.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.