#community-help

JSONDecodeError Issue in Typesense Collection Creation with Python

TLDR Sai encountered a JSONDecodeError while creating a schema. Kishore Nallan tested the same setup but did not face any issues. Sai will check on their side and get back.

Powered by Struct AI
Mar 01, 2023 (7 months ago)
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
12:14 PM
Hi Kishore Nallan, Getting json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) when calling typesense_client.collections.create(schema) . This is a python code . The schema is
{
            'name': 'idi_v8',
            'fields': [
                {"name": ".*", "type": "auto"},
                {'name': 'title', 'type': 'string', 'facet': True},
                {'name': 'content_type', 'type': 'string', 'facet': True}
            ]
        }
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:39 PM
From the server?
12:43
Kishore Nallan
12:43 PM
json.decoder.JSONDecodeError: is Python-side error. What version of the Python client are you using?
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
12:46 PM
using 0.15.0 with typesense 0.22.1
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:49 PM
Always happens even with a simple collection creation or only with specific to this schema?
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
12:50 PM
very specific to this schema , dont have another schema actually. was trying to clean and re-insert the data and this happened.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:50 PM
Let me try, hold on.
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
12:52 PM
sure thanks
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:03 PM
Not facing any issues here. Tried same version of client on 0.22.1 server version.
Sai
Photo of md5-6c1f32ee79d1166e54e3f17345b8d814
Sai
01:17 PM
Okay let me check on my side and get back