Skip to content

Error Occurs When Retrieving Usage Information Due to Delay in Data Availability #457

@Viamo

Description

@Viamo

What is the current behavior?

When calling deepgram.listen.prerecorded.v('1').transcribe_file(payload, options) followed immediately by deepgram.manage.v('1').get_usage_request(DEEPGRAM_PROJECT_ID, requestId), an error occurs in the file client.py at line 1004. The variable result has a value of None.

Steps to reproduce

  1. Call deepgram.listen.prerecorded.v('1').transcribe_file(payload, options).
  2. Immediately call deepgram.manage.v('1').get_usage_request(DEEPGRAM_PROJECT_ID, requestId) with DEEPGRAM_PROJECT_ID and requestId.

Expected behavior

The get_usage_request function should return valid usage information without returning None, and the package should handle the error if the data is not available yet.

Please tell us about your environment

  • Operating System/Version: Windows 10
  • Python Version: v3.11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions