poppu-mtg / StackIt

Python script generating a column-shaped TCG decklist based on cropped captions of each card's art.
MIT License
14 stars 6 forks source link

Magic Decklist Failing to Generate #49

Closed JeffHoogland closed 7 years ago

JeffHoogland commented 7 years ago

Decklist: http://paste.debian.net/929891/ Output:

jeff@hoogl-desktop:/media/Storage/GitHub/StackIt$ python StackIt.py /home/jeff/Cycling\ Drakes.txt Running on python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] ==Settings== cards: {forest: unh, island: unh, mountain: unh, plains: unh, swamp: unh} options: {display_sideboard: true}

Looking up Attune with Aether (None) ['AttunewithAether', u'kld', u'145'] ('Attune with Aether', u'KLD', 'G') Looking up Blossoming Defense (None) ['BlossomingDefense', u'kld', u'146'] ('Blossoming Defense', u'KLD', 'G') Looking up Botanical Sanctum (None) ['BotanicalSanctum', u'kld', u'244'] ('Botanical Sanctum', u'KLD', '') Looking up Censor (None) ['Censor', u'akh', u'46'] ('Censor', None, '1U') Looking up Curator of Mysteries (None) ['CuratorofMysteries', u'akh', u'49'] ('Curator of Mysteries', None, '2UU') Looking up Dissenter's Deliverance (None) ['DissentersDeliverance', u'akh', u'164'] ("Dissenter's Deliverance", None, '1G') Looking up Drake Haven (None) ['DrakeHaven', u'akh', u'51'] ('Drake Haven', None, '2U') Looking up Enigma Drake (None) ['EnigmaDrake', u'akh', u'198'] ('Enigma Drake', None, '1UR') Looking up Forest (unh) ('Forest', 'unh', '') Looking up Hieroglyphic Illumination (None) ['HieroglyphicIllumination', u'akh', u'57'] ('Hieroglyphic Illumination', None, '3U') Looking up Island (unh) ('Island', 'unh', '') Looking up Magma Spray (None) ['MagmaSpray', u'jou', u'170'] ('Magma Spray', u'JOU', 'R') Looking up Mountain (unh) ('Mountain', 'unh', '') Looking up Sheltered Thicket (None) ['ShelteredThicket', u'akh', u'248'] ('Sheltered Thicket', None, '') Looking up Spirebluff Canal (None) ['SpirebluffCanal', u'kld', u'249'] ('Spirebluff Canal', u'KLD', '') Looking up Sweltering Suns (None) ['SwelteringSuns', u'akh', u'149'] ('Sweltering Suns', None, '1RR') Looking up Wandering Fumarole (None) ['WanderingFumarole', u'ogw', u'182'] ('Wandering Fumarole', u'OGW', '') Looking up Dispel (None) ['Dispel', u'bfz', u'26'] ('Dispel', u'BFZ', 'U') Looking up Drake Haven (None) ['DrakeHaven', u'akh', u'51'] ('Drake Haven', None, '2U') Looking up Harnessed Lightning (None) ['HarnessedLightning', u'kld', u'117'] ('Harnessed Lightning', u'KLD', '1R') Looking up Manglehorn (None) ['Manglehorn', u'akh', u'175'] ('Manglehorn', None, '2G') Looking up Release the Gremlins (None) ['ReleasetheGremlins', u'aer', u'96'] ('Release the Gremlins', u'AER', 'XXR') List(game=1, mainboard=[Card(name='Attune with Aether', set=u'KLD', cost='G', quantity='4', collector_num=u'145'), Card(name='Blossoming Defense', set=u'KLD', cost='G', quantity='4', collector_num=u'146'), Card(name='Botanical Sanctum', set=u'KLD', cost='', quantity='4', collector_num=u'244'), Card(name='Censor', set=None, cost='1U', quantity='4', collector_num=u'46'), Card(name='Curator of Mysteries', set=None, cost='2UU', quantity='4', collector_num=u'49'), Card(name="Dissenter's Deliverance", set=None, cost='1G', quantity='4', collector_num=u'164'), Card(name='Drake Haven', set=None, cost='2U', quantity='2', collector_num=u'51'), Card(name='Enigma Drake', set=None, cost='1UR', quantity='4', collector_num=u'198'), Card(name='Forest', set='unh', cost='', quantity='2', collector_num=None), Card(name='Hieroglyphic Illumination', set=None, cost='3U', quantity='4', collector_num=u'57'), Card(name='Island', set='unh', cost='', quantity='2', collector_num=None), Card(name='Magma Spray', set=u'JOU', cost='R', quantity='4', collector_num=u'170'), Card(name='Mountain', set='unh', cost='', quantity='2', collector_num=None), Card(name='Sheltered Thicket', set=None, cost='', quantity='4', collector_num=u'248'), Card(name='Spirebluff Canal', set=u'KLD', cost='', quantity='4', collector_num=u'249'), Card(name='Sweltering Suns', set=None, cost='1RR', quantity='4', collector_num=u'149'), Card(name='Wandering Fumarole', set=u'OGW', cost='', quantity='4', collector_num=u'182')], sideboard=[Card(name='Dispel', set=u'BFZ', cost='U', quantity='4', collector_num=u'26'), Card(name='Drake Haven', set=None, cost='2U', quantity='1', collector_num=u'51'), Card(name='Harnessed Lightning', set=u'KLD', cost='1R', quantity='4', collector_num=u'117'), Card(name='Manglehorn', set=None, cost='2G', quantity='4', collector_num=u'175'), Card(name='Release the Gremlins', set=u'AER', cost='XXR', quantity='2', collector_num=u'96')], commander=[]) ['AttunewithAether', u'kld', u'145'] ['BlossomingDefense', u'kld', u'146'] Traceback (most recent call last): File "StackIt.py", line 13, in builder.main(sys.argv[1]) File "/media/Storage/GitHub/StackIt/builder.py", line 278, in main draw_mtg_card(card, nstep) File "/media/Storage/GitHub/StackIt/builder.py", line 108, in draw_mtg_card lookupScan = scraper.download_scan(card.name, card.set, card.collector_num) File "/media/Storage/GitHub/StackIt/scraper.py", line 14, in download_scan expansion = expansion.lower() AttributeError: 'NoneType' object has no attribute 'lower'

poppu-mtg commented 7 years ago

I looked into it, the problem comes from AKH cards not being available yet in the scans database StackIt is currently using.

silasary commented 7 years ago

Amonkhet is now available on MCI.

poppu-mtg commented 7 years ago

AKH scans now available