Skip to content
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

Future Cancelled Error #61

Open
parikls opened this issue Dec 7, 2021 · 1 comment
Open

Future Cancelled Error #61

parikls opened this issue Dec 7, 2021 · 1 comment

Comments

@parikls
Copy link

parikls commented Dec 7, 2021

Eventually during real-time transcription i'm receiving next error:

InvalidStateError: CANCELLED: <Future at 0x7f562153e2b0 state=cancelled>
  File "awscrt/http.py", line 243, in _on_body
    self._on_body_cb(http_stream=self, chunk=chunk)
  File "amazon_transcribe/httpsession.py", line 99, in _on_body
    future.set_result(chunk)
  File "concurrent/futures/_base.py", line 533, in set_result
    raise InvalidStateError('{}: {!r}'.format(self._state, self))

That's actually the full stack-trace so i assume this is being ran in a separate thread (?) and the error is not being propagated. I even can't handle it actually

@SamComber
Copy link

await self.stream.input_stream.end_stream() seemed to fix this for me if anyone else is having issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants