Back

Appwrite python SDK

  • 0
  • Databases
  • Cloud
Himanshu
23 Jan, 2024, 12:48

It's just 18 digits

TL;DR
Title: Appwrite Python SDK - Storing ID as String The developer is trying to store an ID (`564160730845151244`) as a string attribute in Appwrite. They are getting the error "Out of range value for column 'id'". The developer wants to avoid using integers for the ID and instead use strings. The suggested solutions are to double-check that the attribute is set as a string and recreate the collection if necessary. They should also avoid converting the ID to an integer in the code and pass string values to the database. Adding some print statements can help provide more context to the error. Additionally, it is
Himanshu
23 Jan, 2024, 12:48

How much it should be

Himanshu
23 Jan, 2024, 12:48

Does the system counts 3 digits as 100

Himanshu
23 Jan, 2024, 12:48

:appwritepeepo:

kamal.panara
23 Jan, 2024, 12:49

yes

Himanshu
23 Jan, 2024, 12:49

Wtf man

Himanshu
23 Jan, 2024, 12:49

Sry for slang

Himanshu
23 Jan, 2024, 12:49

Server IDs are of 18 digits

kamal.panara
23 Jan, 2024, 12:49

999999999999999999

Himanshu
23 Jan, 2024, 12:49

It may be show error

kamal.panara
23 Jan, 2024, 12:50

try something like this as max limit

Himanshu
23 Jan, 2024, 12:50

Ok

Himanshu
23 Jan, 2024, 12:51

Ig

Himanshu
23 Jan, 2024, 12:51

We did it

kamal.panara
23 Jan, 2024, 12:51

working ?

Himanshu
23 Jan, 2024, 12:51

Let me test

kamal.panara
23 Jan, 2024, 12:51

ok

Himanshu
23 Jan, 2024, 12:54

Shit

Himanshu
23 Jan, 2024, 12:54

Now it says

Himanshu
23 Jan, 2024, 12:54

Server error

Himanshu
23 Jan, 2024, 12:55

:appwritepeepo:

Himanshu
23 Jan, 2024, 12:55

@Meldiron sry for the ping but what it means

Meldiron
23 Jan, 2024, 12:58

Looking at server error, it still gives Out of range value for column 'id'. Let's please avoid using integers here, if we can. String is intended use for ID and should work perfectly fine in this scenario.

Let's please double check attribute is string - re-create collection if needed. Lets also ensure you no longer convert to int() in the code, and pass string values in database. I would also recommend adding some print()s to ensure the latest changes to code are being used, and possibly give you more context to error if it occurs (pby printing ID, key, collection id, project id, ...)

Meldiron
23 Jan, 2024, 12:58

I am confident storing 564160730845151244 in string attribute of length let's say 255 will work in Appwrite.

Himanshu
23 Jan, 2024, 12:58

Wait then

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more