Hello! I am working through a typical "getting started experience" in Python. I encountered this error while trying to index Hello, Metal!:
Traceback (most recent call last):
File "/home/kb/Repositories/technicalwriting/tools/test.py", line 48, in <module>
print(metal.index({'text': text}))
File "/home/kb/Repositories/technicalwriting/tools/venv/lib/python3.10/site-packages/metal_sdk/metal.py", line 63, in index
res.raise_for_status()
File "/home/kb/Repositories/technicalwriting/tools/venv/lib/python3.10/site-packages/httpx/_models.py", line 749, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://api.getmetal.io/v1/index'
For more information check: https://httpstatuses.com/400
The problem ended up being that my app ID was incorrect. I thought it was the name that I provided when I created my app. For example I used the name technicalwriting.tools. And then I went to the dashboard and I saw what appeared to be an auto-generated ID for my app: technicalwriting.tools-4060129034 (that's not the real string of numbers). It turned out that I need to go to https://app.getmetal.io/apps/.../settings to get the app ID.
I suggest updating Python SDK to make it clear where you get your app ID. I also imagine that this problem exists in other "getting started" docs on your site.
@kaycebasques sorry I just saw this (turning on "Watch" for this repo)! Thanks for opening up a ticket. Thanks for feedback I'm going to look into this
Hello! I am working through a typical "getting started experience" in Python. I encountered this error while trying to index
Hello, Metal!
:The problem ended up being that my app ID was incorrect. I thought it was the name that I provided when I created my app. For example I used the name
technicalwriting.tools
. And then I went to the dashboard and I saw what appeared to be an auto-generated ID for my app:technicalwriting.tools-4060129034
(that's not the real string of numbers). It turned out that I need to go tohttps://app.getmetal.io/apps/.../settings
to get the app ID.I suggest updating Python SDK to make it clear where you get your app ID. I also imagine that this problem exists in other "getting started" docs on your site.
Congrats on the launch and good luck!