# Issue with exporting on csv

**URL:** <https://forums.ankiweb.net/t/issue-with-exporting-on-csv/27578>\
**Category:** Add-ons\
**Created:** [February 18, 2023, 9:48am UTC](https://forums.ankiweb.net/t/issue-with-exporting-on-csv/27578 "2023-02-18T09:48:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shohei](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Shohei](https://forums.ankiweb.net/u/Shohei)\
**Post date:** [February 18, 2023, 9:48am UTC](https://forums.ankiweb.net/t/issue-with-exporting-on-csv/27578/1 "2023-02-18T09:48:17Z")

</div>

I have created an add-on that outputs a csv file with the ratings of anki cards and the time they were rated.  
In the anki-review\_results folder, I stored an empty **init**.py, anki\_rating\_time\_record.py, and a file named manifest.json, and after compressing it, I converted the extension to .ankiaddon.  
However, I got the following error

An error occurred during the installation of anki-review-results.ankiaddon: Invalid add-on manifest.  
Please report this to the add-on author in question.

Anki\_rating\_time\_record.py is as follows  
import anki\_python\_api  
import csv  
import datetime

# reset anki api

Anki = anki\_python\_api.

review\_results =

def review\_did\_answer\_card(result, card, ease):  
now = datetime.datetime.now()  
review\_results.append((result, card, ease, now))

# register Anki API

anki.add\_review\_did\_answer\_card\_callback(review\_did\_answer\_card)

# start anki

anki.run()

# save the results on csv format

with open(“review\_results.csv”, “w”) as f:  
writer = csv.writer(f)  
writer.writer([“timestamp”, “result”, “card”, “ease”])  
for all\_results in review\_results:  
writer.writer([all\_result[0].strftime(“%Y-%m-%d %H:%M:%S”),all\_result[1],  
all\_result[2],all\_result[3]])

The manifest.json is as follows.  
{  
“id” : “anki-review-results”,  
“version”: “0.1”,  
“name”: “Anki Review Results”,  
“description”: “Save the results of your Anki reviews in a CSV file”,  
“author”: “Shohei”,  
“addonType”:[“background”],  
“minimumAnkiVersion”: “2.1.0”  
“files”:[“Anki\_rating\_time\_record.py”,“_init_.py”]  
}

The version of anki in use is 2.1.58.  
What can I do to make it function properly? Please let me know.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [February 20, 2023, 3:57am UTC](https://forums.ankiweb.net/t/issue-with-exporting-on-csv/27578/2 "2023-02-20T03:57:19Z")

</div>

The proper keys for a manifest can be found here [anki/addons.py at f02aac5818136b6c1ac9fb710b785593188024a3 · ankitects/anki · GitHub](https://github.com/ankitects/anki/blob/f02aac5818136b6c1ac9fb710b785593188024a3/qt/aqt/addons.py#L186)

---

<div class="post-metadata">

**Author:** ![Shohei](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Shohei](https://forums.ankiweb.net/u/Shohei)\
**Post date:** [February 20, 2023, 6:20am UTC](https://forums.ankiweb.net/t/issue-with-exporting-on-csv/27578/3 "2023-02-20T06:20:23Z")

</div>

Thank you for your reply.  
I re-ran the manifest.json with only name and package, but the situation did not change.  
The name of the compressed folder is indeed the same as the one specified in package.  
Please let me know if there is another solution.
