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'))
Related
I'm trying to scrap Yahoo finance for stock market info. As I want the data of whole NASDAQ(over 8000 stocks), I'm using multithreading to reduce the execution time. the problem is that it seems Yahoo only allows certain number of my requests to be responded and block all others, giving the error:
equests.exceptions.ConnectionError: HTTPSConnectionPool(host='finance.yahoo.com', port=443): Max retries exceeded with url: /quote/CAT?p=CAT&.tsrc=fin-srch (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000024386785A30>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
Is there any way for resolving the issue?
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”})
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.
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!
I have set up a database and php file running on my host and I run a python code that uploads a json file every 5 minutes using the Requests module. After about 6-8 hours, the app crashes and produces this error:
Max retries exceeded with url: /rpitest2.php (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
What could be the reason for this?
This could happen with badly formed URLs or a DNS failure.
Can you log the full URL that is being accessed? Seems like it is getting corrupted over time.