-
Notifications
You must be signed in to change notification settings - Fork 94
ProxyError in python with API #241
Comments
If you happen to be running the script in a different cloud, the legacy Either way, if you have a proxy in your network environment, you may also need to check there to ensure you can physically reach a domain name like |
@rayluo thank you for your response, |
Our authentication process would need to make some calls to our servers. Roughly speaking, if you copy either of that URL and paste it to your browser and still see the same error, it would mean some network connection issues from within your network. (If your script would be running on a machine different than your current laptop/desktop, your network troubleshooting would need to happen there.) Do you have your network admin to talk to? |
@rayluo if I need to check I by this URL (https://login.windows.net/common/UserRealm/johndoe@contoso.com?api-version=1.0) |
You can use your real email, although that is not yet necessary for this preliminary network troubleshooting step. Just literally paste this
|
@rayluo yes this is my output: |
@rayluo yes they all on the same computer. also, there is a step in the azure portal by click on (Grant admin for...) thank you for helping me. |
If you already know your machine needs some proxy for it to connect to Internet, you need to tell ADAL which proxy to use. See the PS: In case you need a simple python script to test whether your environment variable are setup correctly, the following code snippet roughly mimics how this ADAL library tries to connect to that URL. If it would work, ADAL will also work. import requests
print(requests.get("https://login.microsoftonline.com/common/UserRealm/johndoe@contoso.com?api-version=1.0").text) P.P.S: I'm running out of tricks up my sleeve. :-) |
@rayluo I will try and see what happen, thank you for your time and help |
@rayluo as you suggested I tried this code line
but get the same error, also I tried to pass the proxy on
notice : I did some edit on the error message (URL) for privacy reason |
OK so we confirmed that the firsts hypothesis on the
So, we now consider this Proxy topic came to a conclusion. For your follow-up question, it seems that error message suggests a possible cause:
P.S.:
|
I am trying to use power bi API with python
and I have seen this helpful video
https://www.youtube.com/watch?v=wUzZChTlzdE
but I get this error when I am trying to get the token as shown below
and this is the error
ProxyError: HTTPSConnectionPool(host='login.windows.net', port=443): Max retries exceeded with url: /common/UserRealm/name%40urlname?api-version=1.0 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000253557DA748>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')))
notice : I did some edit on the error message (URL) for privacy reason
I have tried to run it as an administrator but still the same error any help?
The text was updated successfully, but these errors were encountered: