Problem: Running pinecone.list_indexes() or pinecone.create_index() in the Python client results in a TypeError.
TypeError: expected string or bytes-like object
If this happens, it means you still need to initialize your connection to Pinecone. Ensure you first run pinecone.init() before issuing any commands.
Comments
2 comments
straight up just initialized and ran a "list" operation and getting this.
Hi Benjamin,
I have run the same and it is working for me using my own environment variables. The only difference is I used a Jupyter notebook and separated the init() function from the list_indexes() function to make sure the connection is finished connecting. Perhaps this is running in a python script and the init is happening the same time as the list_indexes()?
Please sign in to leave a comment.