gspread: 503 the service is currently unavailable - google-sheets

I have written a python code that downloads data from a google sheet and converts into a csv. I give a google drive id and it scans all the sheets in it, downloading them into local machine. I have ran this program many times, but today I got this error:
raise APIError(response) gspread.exceptions.APIError: { "error": {
"code": 503,
"message": "The service is currently unavailable.",
"status": "UNAVAILABLE" } }
Any inputs would be appreciated.

Having run into this error recently on a script on my own my research brought me to these two articles:
1. https://airbrake.io/blog/http-errors/503-service-unavailable
2. And this so answer
Since you have run this code well in the past it looks to be an issue on google's side and you'll just have to run it again later.

Related

Microsoft Graph API for mail using $value issue

I need to export Exchange email (on premise) into *.eml file. The API
GET https://graph.microsoft.com/v1.0/users/{user_id}/mailFolders/Inbox/messages/{id}/$value
seems is the appropriate one. But it returns error below.
405 Method Not Allowed
{
"error": {
"code": "ErrorInvalidRequest",
"message": "The OData request is not supported. REST APIs for this mailbox are currently in preview. You can find more information about the preview REST APIs at https://dev.outlook.com/.",
"innerError": {
"date": "2022-02-19T15:22:01",
"request-id": "9118f0dd-8d06-4e2b-9fdb-355123ba6a66",
"client-request-id": "78ed917d-4602-867a-5db4-6615e6c29696"
}
}
}
I also tried the
GET https://graph.microsoft.com/v1.0/users/{user_id}/messages/{id}/$value
but still got same error.
But the
GET https://graph.microsoft.com/v1.0/users/{user_id}/mailFolders/Inbox/messages/{id}
can return result properly. It seems this is not security issue, because this API should already return enough data for constructing the *.eml file.
Any one have advise for this?
From the error it sounds like maybe you have a Hybrid environment https://learn.microsoft.com/en-us/graph/hybrid-rest-support and your trying to export a Message from a Mailbox that is onPrem?. If so that won't work for the onPrem mailboxes because they can only do a limited subset of the graph operations and Mime Export isn't one of the current features (not sure if that is going to change in the future). The only work around I know for onPrem would be to use EWS for those mailboxes https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-export-items-by-using-ews-in-exchange until this feature comes to the Graph for Hybrid mailboxes.

YouTube API - setModerationStatus to heldForReview not working

I have tried several times for the past few hours to deal with this but i think it's related to the YouTube Api or some other restriction in place.
I am currently moderating multiple yt channels' comments section through YT API and setting malicious comments in "heldForReview" status if they match specific criterias (scam/spam type of comments)
Since few hours ago i keep receiving the following error:
{
"error": {
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the request's input is invalid.",
"errors": [
{
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the request's input is invalid.",
"domain": "youtube.comment",
"reason": "processingFailure",
"location": "id",
"locationType": "parameter"
}
]
}
}
Nothing changed on my end and i'm wondering if there's an issue with the API or i got restricted in any way
There's nothing to indicate any restrictions applied to my account/project so i suspect its not me.
I'd like to specify that i have an api quota of 500k and it did not get reached. Even now after the reset of the quota, i keep getting the error.
The same when I try to use the API developer (https://developers.google.com/youtube/v3/docs/comments/setModerationStatus)
In the past i did get this kind of error, but the requests were processed and the comments were put in the "heldForMorderation" status.
I'm processing a bulk of 80 comments per call.
I am having the same issue with a custom spamfilter that I have written and have also observed that the ability to hide/remove comments is broken in a commercial product (Agorapulse) that I also use.
Neither setmoderationstatus, markasspam or delete are working, basically there is no way to automatically remove the spam comments. (Which is a big problem on my channel)
Basically it looks like something has changed/broken on the API side, as the commands don't succeed even if run directly from the documentation website. (Everything worked fine until about 48hrs ago)
I confirm what has been shared previously.
We encounter some difficulties with markAsSpam, setModerationStatus and delete on youtube#comment domain.
markAsSpam returns systematically 204 but seems to do nothing
got same error than #YT Guard with setModerationStatus endpoint (100% errors)
same as previous point with delete endpoint
I add that I cannot generate 404 anymore with wrong comment ID.
We started to have this error since the November 19th.
Our investigation doesn't reveal anything for the moment, we reproduce with HTTP API requests (Postman) and the online forms 'Try this API' available in reference documentation.

Natural Language Understanding - Analyze

NLU (Natural Language Understanding) Analyze call is failing with the error codes below,
{"error": "cannot analyze: downstream issue", "code": 500 }
{"error": "failure to communicate with server", "code": 500 }
{"error": "requested service timeout", "code": 500 }
This started happening since 09-Oct-2017.
It is working sometimes and failing most of the times.
Is there any change deployed for NLU?
Is it happening consistently with a given set of inputs? I would suggesting contacting the bluemix support at https://support.ng.bluemix.net/supportticket/?app=technicalsupport&index=13 to follow-up on the issue.
In general, code 500's are unexpected and require some level of digging for the support team to triage.

Error calling the me/joinedGroups endpoint

I have an App that is calling MS Graph API, and was working totally fine until 4-5 days ago. Suddenly, I´m getting an issue calling the me/joinedGroups endpoint.
The error is also happening using the Graph Explorer. It works fine with the dummy tenant, and also with other tenants we have, so it seems like something with just one specific tenant.
This is the error message I´m getting:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Unified groups aren´t supported.",
"innerError": {
"request-id": "ae03e478-d6c5-497a-a6e6-2401e6175988",
"date": "2017-08-16T15:30:02"
}
}
}
I don´t think is a permissions issue, as it is working fine on other tenants. I can also call the /groups endpoint (and some others) successfully. So, if I can get all the groups, I should be able to get my joined groups.
I got attention from the great Yina Arenas (thanks again), from MS, and she asked me to post the issue here
Both of the following are working for me in graph explorer, and they are fully supported.
You can use both of these alternatives *(not the same thing):
https://graph.microsoft.com/v1.0/me/joinedgroups
https://graph.microsoft.com/v1.0/me/memberof
Option 1 is more directed to "UnifiedGroups", while Option 2 is directory objects, and would give you more back than you likely expect.
That error may be because groups are not enabled in a tenant. I haven't played around with graph explorer extensively, I wonder how or if you had signed into into graph explorer. Depending on the circumstances, that this could have caused such an issue for example if you were signed into a tenant with the feature blocked. It does seem to work fine now, regardless. If this comes up try it in an inprivate browser to make doubely sure.

Datastax OpsCenter Install Cluster Error: 400 Client Error when retrieving package_information

I'm attempting to use OpsCenter 6.1 to install a new cluster. OpsCenter successfully ssh's to each of the nodes in the cluster then appears to nearly immediately error out on each node with the following message:
400 Client Error: Bad Request for url: http://<opscenter>:8888/api/v1/lcm/internal/nodes/<node-id>/package_information
When attempting to reach that page myself I receive a 404 error with this message:
{"brief": "error", "message": "{\"type\":\"ApiException\",\"code\":404,\"msg\":\"Can't find object for given parameters: {:job-id nil, :node-id \\\"<node-id>\\\"}\"}", "type": "NoSuchResource"}
Note that <opscenter> (above) is the IP address of my local install, and <node-id> is the ID of the node.
Considering that I don't receive the 400 error myself I'm assuming that I'm unable to replicate the scenario that occurs during the install because of some perviously executed steps that are rolled back.
Any insight into what might be causing this issue?
Thanks in advance!
LCM developer here... It's hard to know exactly what's wrong based on the information provided. But here are some tips:
If there's an api error during a job, the error will be recorded in opscenterd.log (usually in /var/log/opscenter in package installs, or in something like ./log/ in tarball installs).
The internal api is private and is not publicly documented. It's authenticated via a per-node secret token that's only valid during the lifetime of a job, so it's fairly challenging to try to ping internal urls manually, we've never needed to have someone try to ping internal api's to successfully diagnose issues in the past. It's not something I'd recommend spending a lot of time on.
You might get more context about LCM is doing when the error happens by turning the "lcm" logger up to debug in opscenter's logback.xml and restarting opscenterd.

Resources