Jertzukka / dlensExporter

Python GUI program to convert .dlens into .csv format.
MIT License
12 stars 6 forks source link

Hello #3

Closed LEVASSEUR-Romain closed 11 months ago

LEVASSEUR-Romain commented 1 year ago

I have probleme : carddata['collector_number']: TypeError: 'NoneType' object is not subscriptable

Jertzukka commented 1 year ago

I have probleme : carddata['collector_number']: TypeError: 'NoneType' object is not subscriptable

Not really but if I had to guess for some reason the .db file you're using doesn't return or returns wrong entries. If you still have the problem and need help, please upload the APK .db, the Scryfall .json you're using and your .dlens file to any filehosting service and I'll try to reproduce.

shrx commented 11 months ago

Hi, I have the same issue. The issue happens when self.getcarddatabyid(id) returns None, which is strange since the dlens database was created using the same version of the apk.

I'm using the apk db extracted from https://apkcombo.com/mtg-card-scanner-delver-lens/delverlab.delverlens/ apk version 5.95 (latest at this time).

My dlens database: 2023_Aug_06_12-58_backup.zip

The entry that is not recognized has ID 45795.

edit: another unrecognized entry has ID 45711.

shrx commented 11 months ago

Using this tool, it recognized both entries https://multimeric.github.io/DelverLensExtract/ :

45795 is Pradesh Gypsies

45711 is Amulet of Kroog

Jertzukka commented 11 months ago

@LEVASSEUR-Romain @shrx

Thank you for the report and @shrx for the reproducible test case, a fix was committed in https://github.com/Jertzukka/dlensExporter/commit/560b89431595ad5f26e3a47e2f4df7f1e0d78a26. The issue was that the cards mentioned were foreign and could not be found from the Scryfall .json you provided (probably limited one such as Default Cards). Now the program skips such cases and informs the user at the end to use a larger Scryfall bulk data file than the one in use right now.

I also added few string conversions for Deckbox thanks to your cardlist, though some of them for example the promos are totally different set names and card numbering between Scryfall and Deckbox so these would all need to be done manually.

The release binaries are not updated yet, but the master branch should work now.

shrx commented 11 months ago

Awesome, thanks for your quick response. Indeed, it works with the "all cards" scryfall database, I consider the issue resolved.

Regarding the uncommon promo cards, yeah, fortunately I don't have many of those so I just updated the set names manually after the deckbox import complained about it.