tassaron / dnd-character

library for making Dungeons & Dragons 5e characters as serializable data
https://pypi.org/project/dnd-character/
Eclipse Public License 2.0
45 stars 17 forks source link

there is a bug in the read me exsample. #1

Closed MechaCoder closed 2 years ago

MechaCoder commented 2 years ago

Hi i am ruining on a Linux python3.7 environment when i run the code and the code provides a Exception


from dnd_character.classes import Bard
from dnd_character.monsters import SRD_monsters
from random import randint

brianna = Bard(
    name="Brianna",
    level=10,
    )
zombie = SRD_monsters["zombie"]
attack_bonus = zombie["actions"][0]["attack_bonus"]
# Zombie rolls a d20 to attack a Bard
if randint(1, 20) + attack_bonus >=  brianna.armour_class:
    print(f"{brianna.name} was hit by {zombie['name']}!")
else:
    print(f"{brianna.name} bravely dodged the attack")
Traceback (most recent call last):
  File ".play.py", line 1, in <module>
    from dnd_character.classes import Bard
  File "/home/commander/.local/share/virtualenvs/dnd-session-helper-CwOVD1Do/lib/python3.7/site-packages/dnd_character/__init__.py", line 15, in <module>
    from .character import Character as CharacterObj
  File "/home/commander/.local/share/virtualenvs/dnd-session-helper-CwOVD1Do/lib/python3.7/site-packages/dnd_character/character.py", line 8, in <module>
    from .experience import Experience, experience_at_level, level_at_experience
  File "/home/commander/.local/share/virtualenvs/dnd-session-helper-CwOVD1Do/lib/python3.7/site-packages/dnd_character/experience.py", line 77, in <module>
    @lru_cache
  File "/usr/lib/python3.7/functools.py", line 490, in lru_cache
    raise TypeError('Expected maxsize to be an integer or None')
TypeError: Expected maxsize to be an integer or None