mtg icon indicating copy to clipboard operation
mtg copied to clipboard

Searching for "--type Legendary --set AKH" throws exception unpacking power/toughness

Open TC01 opened this issue 6 years ago • 1 comments

I attempted to run mtg --type Legendary --set AKH to get a list of all legendary cards from Amonkhet. mtg threw the following exception:

Traceback (most recent call last):
  File "/usr/bin/mtg", line 117, in <module>
    sys.exit(main())
  File "/usr/bin/mtg", line 104, in main
    cards = CardExtractor(url).cards
  File "/usr/lib/python3.6/site-packages/mtglib/card_extractor.py", line 60, in cards
    return self.extract_many()
  File "/usr/lib/python3.6/site-packages/mtglib/card_extractor.py", line 90, in extract_many
    card.power, card.toughness = self.split_pow_tgh(number)
ValueError: not enough values to unpack (expected 2, got 1)

This is using Python 3.6, on Fedora 26, and the latest release (1.6.1).

I thought at first it might be because there is a mix of creature and non-creature legendaries in Amonkhet. However this appears not to be the case because running a similar search over e.g. --set KLD works just fine... so I'm not immediately sure what the issue is.

TC01 avatar Oct 13 '17 04:10 TC01

The issue here was Nissa, Steward or Element's X loyalty. I've made a pull request.

euronay avatar Oct 26 '17 14:10 euronay