I'm uploading csv with costs to Management API and today get an error from API "not all arguments converted during string formatting".
How can I understand what i'm doing wrong?
File size is 656762
Related
I am trying to use post method in this add Attachment to SAP ODATA service (URL), then I am getting the error
"Key 'file_name' not given".
I used Multippart/form-data and given file_name (with single cotes and with out it) still the error is same.
Any idea where to give file_name?
Thanks.
calling a batch prediction for a model deployed on AIP unified
results in an empty results file and a single error file with the following content:
('Post request fails. Cannot get predictions. Error: Unexpected response- {"predictions":[{"data":[{"715":{"0":1}}]}]}.', 1)
This is weird since the error message contains the correct output: {"predictions":[{"data":[{"715":{"0":1}}]}]}, which means that the prediction ran successfully and was the receiving end was able to read it,
the input is JSONL format and includes only a single instance for test purposes
Any idea?
I am trying to convert some documents into answer units with Watson's Document Conversion service, using the watson-developer-cloud Javascript library in Node.js. Certain ones (an example is at IBM internal link and is a .DOCX file) return this error:
Error: code:400 error: The supplied data appears to be in the Office
2007+ XML. You are calling the part of POI that deals with OLE2 Office
Documents. You need to call a different part of POI to process this
data (eg XSSF instead of HSSF)
If I try to convert it via the document conversion demo site, it seems to convert without error. My program downloads the file from the source, writes it to disk, and then uploads it to the Document Conversion service via the above mentioned library.
Is there any way around this error? Consider that this conversion is part of a massive automated conversion of thousands of documents, so manual handling for these outliers is out of the question.
The service attempts to autodetect the media type of the uploaded file using the first few bytes of the file, and the file name.
If the file name is unavailable (i.e., not passed in by your user), you could provide the media type of the file you are uploading in the file portion of the convert call:
file: {
value: fs.createReadStream('filename'),
options: {
contentType: 'application/vnd.openxmlformats officedocument.wordprocessingml.document'
}
}
For the past couple of years, I've been using Google Cloud Storage to handle storing files for a project that runs for a couple months every year. In the process of testing this year, I've been running into issues failing to upload certain files.
This is the response I've been getting:
<Error>
<Code>InvalidPolicyDocument</Code>
<Message>The content of the form does not meet the conditions specified in the policy document.</Message>
<Details>Missing upload</Details>
</Error>
As additional background, I use plupload, and its flash runtime, to handle the upload functionality and send the form submit to GCS.
The headers for the request do include an upload field
------------KM7gL6Ij5KM7KM7cH2Ij5cH2GI3cH2
Content-Disposition: form-data; name="Upload"
Submit Query
and the upload field is specified in the Policy Document I send to GCS
{
"expiration": "2014-09-25T11:32:54.000Z",
"conditions": [
...
["eq", "$Upload", "Submit Query"]
]
}
The only time I get this error is when I try to upload files greater than 100KB in size (file types tested: jpg, png, mp3).
In short, in cases where the file size is greater than 100KB, I get an error telling me that there is no form field for the "upload" variable referenced in the Policy Document, but if the file size is less than 100KB, it accepts the transaction.
I have tried not supplying the "upload" variable as part of the policy document and get the opposite result.
Has anyone encountered something similar or can anyone shed some light on the issue? I'm unsure at this point if plupload is causing the problem or if GCS in fact ignores the "Upload" (submit) field in certain cases but not in others.
Sometimes our GCS upload requests (from App Engine, if that matters) fail with the error "Call error 5". I'm afraid I don't know the actual HTTP status code returned because we are using the google-go-api-client which does some parsing of responses and (if the response is a JSON-formatted error message) only returns the error message itself in the returned error struct.
I presume that "Call error 5" indicates some kind of transient problem on Google's side, but I'd like to confirm this just to be sure...
There is a limit of 10 MB per request and 32 MB per response. Please see: https://developers.google.com/appengine/docs/go/urlfetch/#Go_Quotas_and_limits