-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Occurs When Retrieving Usage Information Due to Delay in Data Availability #457
Comments
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 |
The variable |
Let me take a look at this and see what I can do. |
Thank you for the help. I'm using |
Will be available in the 3.7.0 that is building right now. |
It appears that the error is still occurring because, in the file deepgram-sdk, version: 3.7.3 |
We just need to mark the field Optional which will set it to None. Will make that change. I also think you mean |
ahhhh I see. My misunderstanding on where the error is. That sounds reasonable. thanks for your help with this!! |
There is a PR open for this. A data availability exception will be thrown now:
|
Why might the data be unavailable? Is it possible to ensure the data is always available (availability exception is still necessary to implement)? In third-party APIs, usage is returned immediately in the results of the first API call, without requiring a second API call to retrieve usage, which is why their data is always available. |
I am not sure, but I will pass this along to the API platform team to see if they can address that. Otherwise, if we do receive a |
This should be available in 3.7.4 |
I ended up duplicating it. Give this a try: |
Hi, David! I tested v3.7.5 and noticed an odd issue: when making identical
If I repeat the In the end, the minimal loop log looks like this:
Sometimes I get a |
Yea, the behavior is definitely API related since the SDK is only passing things through. For the times you get 0.0, if you re-query a little later, does it give you the correct value? |
|
Yeah, that's the API, and it is probably due to the internal replication of values. In your use case, you need to take note of the value and retry. I can pass this feedback along since this is an API artifact. |
Yes, please pass along this feedback.
|
Hello! Again this error 😫:
|
The issue is still not resolved. |
We are considering switching to another service, |
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.
The text was updated successfully, but these errors were encountered: