AttributeError: when importing pokergames.leduc_gametree
machine: intel core i3, Ubuntu 16.04, python 3.6 how to reproduce -
- git clone repo
- cd to local folder containing the repo
- create a jupyter notebook and import leduc as follows
from pokergames import leduc_gametree
The error message attached below:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/Desktop/pycfr/pokergames.py in
~/Desktop/pycfr/pokertrees.py in
~/Desktop/pycfr/hand_evaluator.py in
~/Desktop/pycfr/lookup_tables.py in
~/Desktop/pycfr/card.py in
~/Desktop/pycfr/card.py in Card() 30 RANK_ACE = 14 31 ---> 32 STRING_TO_SUIT = dict([(v, k) for k, v in SUIT_TO_STRING.iteritems()]) 33 STRING_TO_RANK = dict([(v, k) for k, v in RANK_TO_STRING.iteritems()]) 34
AttributeError: 'dict' object has no attribute 'iteritems'`
This is a python 3 compatibility issue. Right now the code only supports python 2.7. I'm happy to accept a pull request if anyone wants to upgrade the code. I'm not sure when I'll have time to do it myself.