Max retry error while requesting auth token in docusign api - python

In docusign version 3.1.0, python version 3.5 and 3.6 in sandbox mode, I'm getting following error:
MaxRetryError at /return_url/8a2108d2-ee01-4c1a-ae53-47d305a92988/
HTTPSConnectionPool(host='https', port=443):
Max retries exceeded with url: //account-d.docusign.com/oauth/token
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x7fe15ca63438>: Failed to establish a new connection:
[Errno -2] Name or service not known',))

From the error message, it looks like you're not specifying the URL correctly.
You should be doing a POST to https://account-d.docusign.com/oauth/token
It looks like you're close to that but not correct. Eg, why does the error message show that host='https' -- The host should be account-d.docusign.com or https://account-d.docusign.com
Are you using an OAuth Authorization Code Grant library for Python? I always recommend using a library. See our eg-03-python-auth-code-grant example which uses the flask_oauthlib.

Related

HTTP request error: what is the distinction between "Name or service not known" and "Temporary failure in name resolution" errors

While scraping some sites with the requests package in python I came across these 2 Http Connection error's
Name or service not known
ConnectionError: HTTPConnectionPool(host='1xbet666041.top', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f04cd03ab10>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Temporary failure in name resolution
ConnectionError: HTTPConnectionPool(host='1xbet666041.top', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fb9bacf7f10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')
Can any one please explain the difference between the 2 ?
Notice that I got these 2 different errors when using the same domain. The difference was that the first get call was made from DataBricks and the other from google collab.
Thanks.
Name or service not known
A name resolution has been done, and it succeeded in getting a reply, but the reply was: "this name has no IP address". So it is a positive assertion on a negative result.
Temporary failure in name resolution
No name resolution was possible at all, so it is a negative assertion on the possibility of resolving that name.
Notice that I got these 2 different errors when using the same domain.
Yes, but using which nameserver(s)?
Assess your domain correct DNS configuration using a tool like DNSViz online. Any error has to be fixed, and warnings too.

Firebase Admin SDK Python TransportError max retries exceeded

Trying to Fetch and modify data from the real-time database. No code change was done, working fine till yesterday.
Tried creating a new key, disabling service, updating packages. Nothing seems to work.
The code is used in Python Firebase Admin SDK. It is used to get and modify data from the real-time database.
I am using firebase_admin to access Firebase Realtime Database.
#Add Topics
topics=root.child('Topics/')
Category='Kabaddi'
with open('/Users/user/Desktop/balancerproject/single_sample.json') as response:
data = json.load(response)
#topics.update(data)
topics.child(Category+'/').push(data)
send_fcm(data)
#instaQuotes(data.get('Title'))
It is throwing error in topics.child(Category+'/').push(data)
TransportError: HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x10bb4b700>: Failed to establish a new connection: [Errno 60] Operation timed out'))

Kuali Python API Connection

I have recently begun a project for my work that involves me having to connect to an accounting application's API (Kuali).
I have only recently begun working with APIs and am having a great degree of difficulty connecting to this server. When running the following code I receive this error:
import requests
requests.get('https://university.kuali.co/api/v1/auth/authenticate','Authorization: Basic mykeyhere')
print(requests.status_codes)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='university.kuali.co', port=443): Max retries exceeded with url: /api/v1/auth/authenticate?Authorization:%20Basic%20mykeyhere (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x109c276d0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
I would greatly appreciate any help as this project would save a huge amount of my time.
The link to the API documentation can be found below.
https://developers.kuali.co/#general
Authorisation Should be under headers
requests.get(url,headers={“Authorisation”:”Basic your key here”})

PayPal IPN sandbox URL is currently down?

It seems that "https://sandbox.ipnpb.paypal.com/cgi-bin/webscr" is not responding? I'm trying to post sandbox IPN notifications to it to verify them. It was working fine yesterday, but today I'm getting an error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='sandbox.ipnpb.paypal.com', port=443): Max retries exceeded with url: /cgi-bin/webscr (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe126046450>: Failed to establish a new connection: [Errno -2] Name or service not known'))
"Name or service not known" is a DNS problem; that host does not exist
You are probably looking for ipnpb.sandbox.paypal.com/cgi-bin/webscr , which is what is documented

Python Requests Deployment

In on of my Django view´s I am making a request to another webserver via requests, this code works perfect when I run the code with the development server. It looks like that:
import requests
r = requests.post('http://www.example.org')
return r.text
But when I Deploy this an apaches www-data user is running it it throws this error:
ConnectionError
HTTPConnectionPool(host='www.example.com', port=80): Max retries exceeded
with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection
object at 0x7f23e917ba58>:Failed to establish a new connection:[Errno -2]
Name or Service not known'))
But I can run the code as root user from a seperate script on the Deployment server without a problem this is why i think it is a permission problem. But i have no Idea how to solve this.
Thanks in advance!

Categories

Resources