Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python SDK Error #514

Closed
WillBGE opened this issue Jun 12, 2020 · 17 comments
Closed

Python SDK Error #514

WillBGE opened this issue Jun 12, 2020 · 17 comments
Assignees
Labels

Comments

@WillBGE
Copy link

WillBGE commented Jun 12, 2020

Submitting per Tatyana @ Box (Case 2182873):

User Dani.Pinkovich@ge.com is getting

error: Request "GET https://api.box.com/2.0/folders/0/items" failed with ConnectionError exception:
ConnectionError(MaxRetryError("HTTPSConnectionPool(host='api.box.com', port=443):
Max retries exceeded with url: /2.0/folders/0/items?offset=0
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001623BC88988>:
Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))"))

when trying to view folder items. Dani is making a GET call to https://api.box.com/2.0/folders/0/items.
He is authenticating as Service.Ultranet@ge.com. Dani is using the Python SDK, version 2.8.0. His app's details are below:

When using postman, we are able to get the folder information on and off network.

Last email from Tatyana:

Thanks, Dani.

When querying within a few minutes of that timestamp for your app's activity, these are the IP addresses that are being used:

194.9.245.34
104.129.196.179
208.49.203.14
3.230.237.143

However, when I looked at any GET calls made from any of these IPs, I get no results.

Since you can make the call successfully in Postman, I agree that this is definitely an issue with the SDK.

@Jeff-Meadows
Copy link
Contributor

This almost certainly is a network configuration issue. [Errno 11001] getaddrinfo failed indicates that the process isn't able to resolve the address of api.box.com. This is common when the code is being run on a machine where internet access is managed by a proxy. If it works in postman, that's probably because the browser from which it's being run (Chrome) is configured for the proxy.

I'm not sure if we have any tutorials for configuring Python for proxy settings.

@PJSimon
Copy link
Member

PJSimon commented Jun 12, 2020

@WillBGE was @Jeff-Meadows's comment helpful?
Perhaps this documentation can help you configure proxy settings for your Python project.

@WillBGE
Copy link
Author

WillBGE commented Jun 14, 2020 via email

@WillBGE
Copy link
Author

WillBGE commented Jun 15, 2020 via email

@yossibatash
Copy link

Hi guys,
I am also getting the same error, is there a workaround or a stable version?
Best
Yossi

@sujaygarlanka
Copy link
Contributor

@yossibatash Are you also running the SDK behind a proxy and if so, what type of proxy is it?

@sujaygarlanka
Copy link
Contributor

@WillBGE What type of proxy is being used (i.e. http, https, socks)?

@sujaygarlanka
Copy link
Contributor

sujaygarlanka commented Jun 18, 2020

@WillBGE I would also try running a curl command like the one below in your environment. If it works, then we know the issue is more likely related to the SDK rather than the environment.

curl -X GET https://api.box.com/2.0/files/12345 \
     -H 'Authorization: Bearer <ACCESS_TOKEN>' 

@danipinkovich
Copy link

C:>curl -X GET https://api.box.com/2.0/files/12345 -H 'Authorization: Bearer 0003AGCybo6d7xSPjtBYzpQmf2F5'
curl: (52) Empty reply from server

<title>400 Bad Request</title>

Bad Request

Your browser sent a request that this server could not understand.

curl: (56) Recv failure: Connection was reset

@WillBGE
Copy link
Author

WillBGE commented Jun 18, 2020 via email

@danipinkovich
Copy link

danipinkovich commented Jun 19, 2020 via email

@WillBGE
Copy link
Author

WillBGE commented Jun 19, 2020 via email

@danipinkovich
Copy link

danipinkovich commented Jun 19, 2020 via email

@sujaygarlanka
Copy link
Contributor

sujaygarlanka commented Jun 19, 2020

@danipinkovich @WillBGE Even the curl doesn’t seem to be working and is throwing a connection reset error. So it seems like it’s something to do with your environment more than the SDK. I would see if curl calls to other APIs, like an example or test API work.

@PJSimon
Copy link
Member

PJSimon commented Jun 27, 2020

HI @danipinkovich @WillBGE ,

It sounds like this issue is with your environment and not with the SDK. Any update from your end? I'm going to assume that we can close this Issue, but if you are still having issues, please just re-open it and we'll go from there!

Thanks,

Patrick

@PJSimon PJSimon closed this as completed Jun 27, 2020
@zkarpinski
Copy link

@WillBGE Wanted to note this is all public. Might want to redact some info.

@yossibatash
Copy link

Hi @sujaygarlanka, I have managed to isolate the problem, when I am turning off my VPN (Palo alto global protect) I am not experiencing this issue, I asked my DevOps team to enable this type of request in the firewall but they haven't done it yet so I can't really say that this issue been resolved
Hope that helping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants