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...
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.
WoodDad79
1 year agoFrequent Visitor
I'm facing this same problem and I tried using urllib instead of requests but no luck. Still blocked for python visuals in PBI service. Has anybody found a workaround?