kelesi / mtga-utils

Magic the Gathering: Arena related stuff (Card collection export)
MIT License
53 stars 13 forks source link

Failure to extract collection #18

Closed jre2 closed 4 years ago

jre2 commented 4 years ago

Command executed:

mtga-export --goldfish -f collection.csv

Tail of output (the output before this is just a repeat of the first two lines but with different card ids):

Info: Unknown card in collection: Pool does not contain 70359 (Will fetch it from Scryfall) Warning: Could not fetch unknown card from scryfall: Unknown card id 70359. Status code: 404 Info: Unknown card in collection: Pool does not contain 70363 (Will fetch it from Scryfall) Warning: Could not fetch unknown card from scryfall: Unknown card id 70363. Status code: 404 Info: Unknown card in collection: Pool does not contain 70362 (Will fetch it from Scryfall) Warning: Could not fetch unknown card from scryfall: Unknown card id 70362. Status code: 404 Traceback (most recent call last): File "mtga-export.py", line 186, in File "mtga-export.py", line 164, in main AttributeError: 'str' object has no attribute 'set' [5824] Failed to execute script mtga-export

baronvonvaderham commented 4 years ago

I think this may be due to the cosmetic card styles. One of the IDs that fails is 70248:

 {

      "id": 27,

      "unlockQuestMetric": null,

      "unlockMetricCount": 0,

      "chest": {

        "image1": "ObjectiveIcon_PremiumSkin",

        "image2": null,

        "image3": null,

        "prefab": "RewardPopup3DPremiumCardStyle",

        "referenceId": "DA.70248",

        "headerLocKey": "EPP/RewardTrack/CardStyle",

        "descriptionLocKey": null,

        "quantity": null,

        "locParams": {},

        "availableDate": "0001-01-01T00:00:00"

      },

      "upgradePacket": null,

      "childIds": []

    },

Then it tries to fetch these from Scryfall and fails.

kelesi commented 4 years ago

python-mtga uses dynamic card extraction from arena data. Seems like it can fetch these problematic cards now.