table().get_schema(name) fails with table (name) not found, search_and_filter().query(table) works
Hey,
so here's a snippet of code I'm using
following https://xata-py.readthedocs.io/en/latest/api.html#xata.api.table.Table.get_schema, https://github.com/xataio/xtools/blob/main/xfileindex/localfileindex.py#L79 and anything else I can find.
my logs go:
which seems weird, given I just got a query running on that exact table a line earlier.
Given one of the errors I run into trying to figure this out there may be an issue with Python SDK interacting with Postgres-ready database, but I can't tell for sure if there's an actual bug or I'm missing something.
As far as I can tell it's hitting the same url up to /search vs /schema (https://github.com/xataio/xata-py/blob/main/xata/api/search_and_filter.py#L853 vs https://github.com/xataio/xata-py/blob/main/xata/api/table.py#L148) so... I don't know.
2 Replies
... I just noticed title suggest I'm using different vairable, but as seen in code, I do not ^^
Let me take a look and see if I can recreate the issue 👍
I was able to recreate this error and I can confirm that
get_schema()
does not work with a Postgres-enabled database. It does, however, work with a non-Postgres-enabled database.