Closed Rocknpools closed 4 years ago
This looks like a primary key clash in the items table. Are you sure there is no item with client_item_id = "9223372036854775807" Also, this script is really only for initial imports as it clears the db. Which might explain why it worked on the second call.
I'm sure that there is no duplicate client_item_id. I've noticed that for some reason the static import set item_id and client_item_id as the same(this happen only using UUID)
i.e. the items: "A”,"nam1”,"attr1_1","attr2_1","attr3_1","attr4_1","attr5_1" has item_id=A and client_item_id=A where A is only a part of original UUID(for some reason it truncate the ID)
while using a /items POST the item_id is correct(incremental mysql id)
ok . Maybe you can upload a tar/zip file with the files and instructions to repeat and we can have a look?
@Rocknpools thanks for sharing this issue with us. Please let us know if this is resolved?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
i tryed to import i file with two row like this:(obviously the schema it’s correct the file is only an example) id,name,attr1,attr2,attr3,attr4,attr5 "563e146b1e0b688a0946a887”,"nam1”,"attr1_1","attr2_1","attr3_1","attr4_1","attr5_1" "563e146b1e0b688a0946a884”,"nam2”,"attr1_2","attr2_2","attr3_2","attr4_2",”attr5_2" i got this error: inserting items into the db Unexpected error ... <class '_mysql_exceptions.IntegrityError'> Clearing DB of items and attributes (1062, "Duplicate entry '9223372036854775807' for key 'PRIMARY’") if i change the previous file in: id,name,attr1,attr2,attr3,attr4,attr5 "563”,"nam1”,"attr1_1","attr2_1","attr3_1","attr4_1","attr5_1" "5”,"nam2”,"attr1_2","attr2_2","attr3_2","attr4_2",”attr5_2” using numeric id istead of UUID it goes ok! Seems that the problem is not the UUID because using a RESTFUL POST /item it add the items correctly