Closed bein7 closed 4 years ago
Your example code creates a child item, it does not add an item to a collection.
You haven't specified what C5U3MI63
is – is it a collection ID?
If it's a collection ID, you would have to do this instead:
new_item = [{ 'itemType': "book", 'title': "Test du vendredi", } ]
result = zot.create_items(new_item)
zot.addto_collection("C5U3MI63", result[0])
Yes. Thanks. I thought a child item means an item added to a collection.
General
If at all possible, provide a MVCE. If this is inappropriate (e.g. it's obviously a bug), just fill in the below:
Platform:
Python version: 3.7 Pyzotero version:
Problem description
If possible, paste the full traceback in a code block below, and fill in the summary
Traceback
new_item = [{ 'itemType': "book", 'title': "Test du vendredi", } ] zot.create_items(new_item, "C5U3MI63") code goes here, indented with four spaces