Help troubleshooting thread creation

I am using the Open AI Python client:

thread = client.beta.threads.create()

I get a response, but when I subsequently call

client.beta.threads.retrieve(thread_id=thread.id)

I receive the error

openai.NotFoundError: Error code: 404 - {
    'error': {
        'message': "No thread found with id 'thread_KEKUQ61136JghqWlcY0eZox1'.",
        'type': 'invalid_request_error',
        'param': None,
        'code': None}}

Which doesn’t make sense because I just created the thread. Any idea where to start for troubleshooting? I can’t see the threads via the web dashboard either.

client.beta.threads.retrieve(thread_id=thread.id)

Is wrong.

client.beta.threads.retrieve(thread.id)

Is correct

I may be wrong here (not a python programmer) but the former is used for optional parameters