Sudden 403 Error on Text Detection - google-cloud-vision

I was working with the standard example code for the text detection API and everything was working fine, but now if I try to run the same program (no edits made) on a new image, python returns the error:
Http Error for /Users/lummish/Documents/Cloud Vision Tests/foodman.jpg
< HttpError 403 when requesting https://vision.googleapis.com/v1/images:annotate?alt=json returned "Request Issue Failed.">
Which in turn causes the following error:
AttributeError: 'NoneType' object has no attribute 'items'
I can't seem to figure out what's going on. I've tried getting a new keypair as well as cloning the project from scratch, but neither accomplished anything. Any help would be appreciated.

Have you tried running a curl request on your image to ensure your api key is valid etc

Related

Can anyone enlighten me as to why this swagger file is throwing errors?

While creating a custom connector for Power Automate, I'm getting the following error with the swagger (no validation errors are occurring & I have checked it via multiple editors),
The request failed with client error: '{"Code":"","Message":"GET https://power-apim-europe-001.management.azure-api.net/subscriptions/873e5639-9775-4e58-ac59-935e3f7dbc6c/resourceGroups/apim-power-europe-001/providers/Microsoft.ApiManagement/service/power-apim-europe-001/apis/smartsheet-20api-5f83fde20557d336df-5f8f194df2cac2ec5c?import=true&protocols=https&path=apim%2fsmartsheet-20api-5f83fde20557d336df-5f8f194df2cac2ec5c&api-version=2019-01-01&asyncId=623a42ef47fc0015e44853aa&asyncCode=201 failed with BadRequest, content={\"error\":{\"code\":\"ValidationError\",\"message\":\"One or more fields contain incorrect values:\",\"details\":[{\"code\":\"ValidationError\",\"target\":\"value[121].urlTemplate\",\"message\":\"URL template is invalid\"}]}}","Target":null,"Details":[],"Innererror":null}'. The correlation Id is '7eabc939-4c3f-484e-bdbd-b4568844c321'.
Pastebin - Swagger File
(pasted to pastebin due to SO character limit for question body)
I seem to be banging my head against a brick wall now, as the error message isn't helpful at all. Can anyone spot whats wrong here?

403 Forbidden Error when calling an AWS API Gateway in Python

I set up a REST API in AWS with a PUT method to upload files to an S3 bucket. The "Authorization" field in the Method Request is set to NONE. I'm calling the API in Python like so:
file = {"file": open('file.jpg', 'rb')}
requests.put(https://api-id.execute-api.us-east-1.amazonaws.com/Prod/bucketname/filename, files=file)
However, each time this command runs, it returns the error:
"403 Client Error: Forbidden for url: https://api-id.execute-api.us-east-1.amazonaws.com/Prod/bucketname/filename"
This doesn't make sense to me; authorization is set to NONE, so anybody should be able to call the API - why am I getting "Forbidden"? Also, the request works perfectly fine in Postman - I am able to call the API and upload the file and it returns "200 Successful".
I've searched other posts on Google and StackOverflow to no avail. What is going on?
Figured it out, I was sending Binary files up to the gateway without adding those file types to the "Binary File Types" section in Settings. For some reason this resulted in a 403 Forbidden Error (even though it wasn't an authentication issue at all).

After server migration, Silverstripe 4 throwing error when trying to upload files

I just migrated a SS4 site to a new server. Now, when I try to upload an image, I get the message below. Here is the error I’m seeing:
>
>
> Server responded with an error. Authentication required
>
> Unexpected token > in JSON at position
This is happening even though I have just authenticated as an Admin. I thought it was a permissions problem on the file system, but after looking further into it, that doesn't seem to be the case.
The files do seem to upload, but the preview is not created and does not appear in the preview area. I can save the asset, but not with the "save" and "publish" buttons in the bottom right, I have to use the bulk actions to publish the files. Once I do this, the preview appears.
I'm receiving / have received these error in the console:
Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
(async)http://example.com/admin/assets/show/295/edit/307 400 (Bad Request)
GET http://example.com/admin/assets/show/295/edit/307 400 (Bad Request)
Anyone have experience with or documentation about this? Not sure how to go about diagnosing/fixing this.

Receiving "kCFStreamErrorDomainSSL error -9841" error from Paw

I'm attempting to make a request using Paw, and I'm getting this mysterious error:
kCFStreamErrorDomainSSL error -9841
Attempts to execute the same request using cURL, other OS X REST clients, etc... all work with no problem at all. I've search for references to the -9841 instance of this error, and have turned up nothing.
As mentioned by Micha Mazaheri, in a previous comment, the best way to solve this problem is to go to Paw preferences and to choose a different client library from within the HTTP tab. I was not aware this was an option.

LoadRunner and XML Data with Flex 3

We have a Flex app that we are trying to test with Load Runner. The application runs just fine when run stand-alone in a browser. When the app initializes, an XML properties file is loaded.
When trying to access the same application (using the same URL) with LoadRunner, a Fault occurs when trying to load the same properties file that was previously returned with no errors. The fault message is as follows:
Error Initializing Properties: faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error.
The API docs say that IOError occurs when a read / write is attempted on a socket that is disconnected. The strange thing here is that using Fiddler, I am able to verify that the entire contents of the XML file are returned. I have also verified that the URL is correct (it's an absolute URL).
Has anyone ever encountered this situation? We have been trying to resolve this for weeks now, and any help would be greatly appreciated.

Resources