Open Viamo opened 2 weeks ago
I looked into this, and it is an API issue. I will forward it to engineering, as the API should return an error instead of a result.
In the meantime, I would recommend checking for the null
value in the result to determine data availability if you have a need for the API that quickly; otherwise, will need to wait for this fix in the API.
The variable result
is not accessible because it is inside the package. The only way is to give up on the SDK and access the API directly, but for now, I just added sleep()
.
The variable
result
is not accessible because it is inside the package. The only way is to give up on the SDK and access the API directly, but for now, I just addedsleep()
.
Let me take a look at this and see what I can do.
Thank you for the help. I'm using sleep()
, and that’s sufficient for now. It would be great if you could address the errors at your end. Thanks!
What is the current behavior?
When calling
deepgram.listen.prerecorded.v('1').transcribe_file(payload, options)
followed immediately bydeepgram.manage.v('1').get_usage_request(DEEPGRAM_PROJECT_ID, requestId)
, an error occurs in the fileclient.py
at line 1004. The variableresult
has a value ofNone
.Steps to reproduce
deepgram.listen.prerecorded.v('1').transcribe_file(payload, options)
.deepgram.manage.v('1').get_usage_request(DEEPGRAM_PROJECT_ID, requestId)
withDEEPGRAM_PROJECT_ID
andrequestId
.Expected behavior
The
get_usage_request
function should return valid usage information without returningNone
, and the package should handle the error if the data is not available yet.Please tell us about your environment
Other information
The issue appears to be related to the delay in retrieving usage information. Even if the information is unavailable, the error should still be handled properly by the package.