davidchambers / tutor

JavaScript interface for the Gatherer card database
https://gatherer.wizards.com/
Do What The F*ck You Want To Public License
149 stars 18 forks source link

gatherer compatibility branch doesn't parse certain sets #86

Closed robdennis closed 10 years ago

robdennis commented 10 years ago

using my example script from the wiki I tried pulling down a local "mirror" of gatherer (I do this after most set releases). I noticed that several (~10?) sets don't parse, using json or summary. Here's an example:

$ ~/development/tutor/bin/tutor set Invasion
TypeError: Cannot set property 'name' of undefined
$ ~/development/tutor/bin/tutor set Invasion --format json
TypeError: Cannot set property 'name' of undefined

Poking around gatherer didn't reveal an obvious reason these sets look different, and although I did receive some intermittent "unknown error" messages, I've not yet had gotten one of the sets that didn't work, to work.

FWIW, the set the unit tests use is Eventide, which appears to work fine.

Here's a complete output log that shows the sets I had problems with:

DEBUG:root:searching for sets
DEBUG:root:searching for set name: u'Alara Reborn'
DEBUG:root:searching for set name: u'Alliances'
DEBUG:root:searching for set name: u'Antiquities'
DEBUG:root:searching for set name: u'Apocalypse'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Apocalypse']
DEBUG:root:searching for set name: u'Arabian Nights'
DEBUG:root:searching for set name: u'Archenemy'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Archenemy']
DEBUG:root:searching for set name: u'Avacyn Restored'
DEBUG:root:searching for set name: u'Battle Royale Box Set'
DEBUG:root:searching for set name: u'Beatdown Box Set'
DEBUG:root:searching for set name: u'Betrayers of Kamigawa'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Betrayers of Kamigawa']
DEBUG:root:searching for set name: u'Born of the Gods'
DEBUG:root:searching for set name: u'Champions of Kamigawa'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Champions of Kamigawa']
DEBUG:root:searching for set name: u'Chronicles'
DEBUG:root:searching for set name: u'Classic Sixth Edition'
DEBUG:root:searching for set name: u'Coldsnap'
DEBUG:root:searching for set name: u'Commander 2013 Edition'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Commander 2013 Edition']
DEBUG:root:searching for set name: u"Commander's Arsenal"
DEBUG:root:searching for set name: u'Conflux'
DEBUG:root:searching for set name: u'Dark Ascension'
DEBUG:root:searching for set name: u'Darksteel'
DEBUG:root:searching for set name: u'Dissension'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Dissension']
DEBUG:root:searching for set name: u"Dragon's Maze"
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u"Dragon's Maze"]
DEBUG:root:searching for set name: u'Duel Decks: Ajani vs. Nicol Bolas'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Duel Decks: Ajani vs. Nicol Bolas']
DEBUG:root:searching for set name: u'Duel Decks: Divine vs. Demonic'
DEBUG:root:searching for set name: u'Duel Decks: Elspeth vs. Tezzeret'
DEBUG:root:searching for set name: u'Duel Decks: Elves vs. Goblins'
DEBUG:root:searching for set name: u'Duel Decks: Garruk vs. Liliana'
DEBUG:root:searching for set name: u'Duel Decks: Heroes vs. Monsters'
DEBUG:root:searching for set name: u'Duel Decks: Izzet vs. Golgari'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Duel Decks: Izzet vs. Golgari']
DEBUG:root:searching for set name: u'Duel Decks: Jace vs. Chandra'
DEBUG:root:searching for set name: u'Duel Decks: Jace vs. Vraska'
DEBUG:root:searching for set name: u'Duel Decks: Knights vs. Dragons'
DEBUG:root:searching for set name: u'Duel Decks: Phyrexia vs. the Coalition'
DEBUG:root:searching for set name: u'Duel Decks: Sorin vs. Tibalt'
DEBUG:root:searching for set name: u'Duel Decks: Venser vs. Koth'
DEBUG:root:searching for set name: u'Eighth Edition'
DEBUG:root:searching for set name: u'Eventide'
DEBUG:root:searching for set name: u'Exodus'
DEBUG:root:searching for set name: u'Fallen Empires'
DEBUG:root:searching for set name: u'Fifth Dawn'
DEBUG:root:searching for set name: u'Fifth Edition'
DEBUG:root:searching for set name: u'Fourth Edition'
DEBUG:root:searching for set name: u'From the Vault: Dragons'
DEBUG:root:searching for set name: u'From the Vault: Exiled'
DEBUG:root:searching for set name: u'From the Vault: Legends'
DEBUG:root:searching for set name: u'From the Vault: Realms'
DEBUG:root:searching for set name: u'From the Vault: Relics'
DEBUG:root:searching for set name: u'From the Vault: Twenty'
DEBUG:root:searching for set name: u'Future Sight'
DEBUG:root:searching for set name: u'Gatecrash'
DEBUG:root:searching for set name: u'Guildpact'
DEBUG:root:searching for set name: u'Homelands'
DEBUG:root:searching for set name: u'Ice Age'
DEBUG:root:searching for set name: u'Innistrad'
DEBUG:root:searching for set name: u'Invasion'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Invasion']
DEBUG:root:searching for set name: u'Journey into Nyx'
DEBUG:root:searching for set name: u'Judgment'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Judgment']
DEBUG:root:searching for set name: u'Legends'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Legends']
DEBUG:root:searching for set name: u'Legions'
DEBUG:root:searching for set name: u'Limited Edition Alpha'
DEBUG:root:searching for set name: u'Limited Edition Beta'
DEBUG:root:searching for set name: u'Lorwyn'
DEBUG:root:searching for set name: u'Magic 2010'
DEBUG:root:searching for set name: u'Magic 2011'
DEBUG:root:searching for set name: u'Magic 2012'
DEBUG:root:searching for set name: u'Magic 2013'
DEBUG:root:searching for set name: u'Magic 2014 Core Set'
DEBUG:root:searching for set name: u'Magic 2015 Core Set'
DEBUG:root:searching for set name: u'Magic: The Gathering-Commander'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Magic: The Gathering-Commander']
DEBUG:root:searching for set name: u'Magic: The Gathering\u2014Conspiracy'
DEBUG:root:searching for set name: u'Masters Edition'
DEBUG:root:searching for set name: u'Masters Edition II'
DEBUG:root:searching for set name: u'Masters Edition III'
DEBUG:root:searching for set name: u'Masters Edition IV'
DEBUG:root:searching for set name: u'Mercadian Masques'
DEBUG:root:searching for set name: u'Mirage'
DEBUG:root:searching for set name: u'Mirrodin'
DEBUG:root:searching for set name: u'Mirrodin Besieged'
DEBUG:root:searching for set name: u'Modern Event Deck 2014'
DEBUG:root:searching for set name: u'Modern Masters'
DEBUG:root:searching for set name: u'Morningtide'
DEBUG:root:searching for set name: u'Nemesis'
DEBUG:root:searching for set name: u'New Phyrexia'
DEBUG:root:searching for set name: u'Ninth Edition'
DEBUG:root:searching for set name: u'Odyssey'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Odyssey']
DEBUG:root:searching for set name: u'Onslaught'
DEBUG:root:searching for set name: u'Planar Chaos'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Planar Chaos']
DEBUG:root:searching for set name: u'Planechase'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Planechase']
DEBUG:root:searching for set name: u'Planechase 2012 Edition'
DEBUG:root:searching for set name: u'Planeshift'
DEBUG:root:searching for set name: u'Portal'
DEBUG:root:searching for set name: u'Portal Second Age'
DEBUG:root:searching for set name: u'Portal Three Kingdoms'
DEBUG:root:searching for set name: u'Premium Deck Series: Fire and Lightning'
DEBUG:root:searching for set name: u'Premium Deck Series: Graveborn'
DEBUG:root:searching for set name: u'Premium Deck Series: Slivers'
DEBUG:root:searching for set name: u'Promo set for Gatherer'
DEBUG:root:searching for set name: u'Prophecy'
DEBUG:root:searching for set name: u'Ravnica: City of Guilds'
DEBUG:root:searching for set name: u'Return to Ravnica'
DEBUG:root:searching for set name: u'Revised Edition'
DEBUG:root:searching for set name: u'Rise of the Eldrazi'
DEBUG:root:searching for set name: u'Saviors of Kamigawa'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Saviors of Kamigawa']
DEBUG:root:searching for set name: u'Scars of Mirrodin'
DEBUG:root:searching for set name: u'Scourge'
DEBUG:root:searching for set name: u'Seventh Edition'
DEBUG:root:searching for set name: u'Shadowmoor'
DEBUG:root:searching for set name: u'Shards of Alara'
DEBUG:root:searching for set name: u'Starter 1999'
DEBUG:root:searching for set name: u'Starter 2000'
DEBUG:root:searching for set name: u'Stronghold'
DEBUG:root:searching for set name: u'Tempest'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Tempest']
DEBUG:root:searching for set name: u'Tenth Edition'
DEBUG:root:searching for set name: u'The Dark'
DEBUG:root:searching for set name: u'Theros'
DEBUG:root:searching for set name: u'Time Spiral'
DEBUG:root:searching for set name: u'Time Spiral "Timeshifted"'
TypeError: Cannot set property 'name' of undefined
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Time Spiral "Timeshifted"']
DEBUG:root:searching for set name: u'Torment'
DEBUG:root:searching for set name: u'Unglued'
TypeError: Cannot read property 'length' of null
WARNING:root:problem with command: [u'~/tutor/bin/tutor', u'--format', u'json', u'set', u'Unglued']
DEBUG:root:searching for set name: u'Unhinged'
DEBUG:root:searching for set name: u'Unlimited Edition'
DEBUG:root:searching for set name: u"Urza's Destiny"
DEBUG:root:searching for set name: u"Urza's Legacy"
DEBUG:root:searching for set name: u"Urza's Saga"
DEBUG:root:searching for set name: u'Vanguard'
DEBUG:root:searching for set name: u'Vintage Masters'
DEBUG:root:searching for set name: u'Visions'
DEBUG:root:searching for set name: u'Weatherlight'
DEBUG:root:searching for set name: u'Worldwake'
DEBUG:root:searching for set name: u'Zendikar'
davidchambers commented 10 years ago

I'll include a fix for this issue in #85.

robdennis commented 10 years ago

+1 thanks David :-)

On Mon, Jul 14, 2014 at 12:16 PM, David Chambers notifications@github.com wrote:

I'll include a fix for this issue in #85.

Reply to this email directly or view it on GitHub: https://github.com/davidchambers/tutor/issues/86#issuecomment-48920961

davidchambers commented 10 years ago

Split cards and flip cards were not being handled correctly. Please confirm that the compatibility branch now works for you, @robdennis.

robdennis commented 10 years ago

thanks David, didn't see this till I got to work. I'll look to sanity check this tonight.

On Fri, Jul 18, 2014 at 12:32 PM, David Chambers notifications@github.com wrote:

Closed #86 https://github.com/davidchambers/tutor/issues/86 via #85 https://github.com/davidchambers/tutor/pull/85.

— Reply to this email directly or view it on GitHub https://github.com/davidchambers/tutor/issues/86#event-143168698.