MagicTheGathering / mtg-sdk-python

Magic: The Gathering SDK - Python
MIT License
255 stars 45 forks source link

finding a card by multiverse_id returns a strange string #35

Closed Tanchwa closed 2 years ago

Tanchwa commented 2 years ago

Just installed the sdk and have run into an issue seaching using the multiverse_id the code

card = Card.find(420830)
print(card)

returns the following string instead of information about the card

<mtgsdk.card.Card object at 0x0000023A3E5190A0>

Other commands like getting sets, types, etc. seem to work fine. using python 3.9

Realms-Reed commented 2 years ago

That's the class Card from here: https://github.com/MagicTheGathering/mtg-sdk-python/blob/master/mtgsdk/card.py

When you try to print an object that doesn't have a __str__ method the interpreter will instead print the name of the class and its memory address.

Try print(dir(card)) to print a representation of the underlying dictionary.