Agony5757/mahjong

pymahjong.test()问题

Closed this issue · 2 comments

环境:ubuntu18.04,python3.10
代码:

import pymahjong
pymahjong.test()

报错:

python test.py
-------------- execption in game 1 -------------------------
'MahjongPyWrapper.Table' object has no attribute 'set_debug_mode'
/home/turk/miniconda3/envs/pymj/lib/python3.10/site-packages/pymahjong/env_pymahjong.py:286: UserWarning: This game has ended, get_curr_player_id return -1 !!
  warnings.warn("This game has ended, get_curr_player_id return -1 !!")
----------- current player: -1 -----------------
[Player 0]
点数:25000
自风东
手牌:
牌河:
No立|门清

[Player 1]
点数:25000
自风东
手牌:
牌河:
No立|门清

[Player 2]
点数:25000
自风东
手牌:
牌河:
No立|门清

[Player 3]
点数:25000
自风东
手牌:
牌河:
No立|门清

-------------- replayable log -------------------------------
Traceback (most recent call last):
  File "/home/turk/miniconda3/envs/pymj/lib/python3.10/site-packages/pymahjong/test.py", line 18, in test
    env.reset(oya=game % 4, game_wind="east", debug_mode=1)
  File "/home/turk/miniconda3/envs/pymj/lib/python3.10/site-packages/pymahjong/env_pymahjong.py", line 112, in reset
    self.t.set_debug_mode(debug_mode)
AttributeError: 'MahjongPyWrapper.Table' object has no attribute 'set_debug_mode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/turk/pymahjong_ai/test.py", line 3, in <module>
    pymahjong.test()
  File "/home/turk/miniconda3/envs/pymj/lib/python3.10/site-packages/pymahjong/test.py", line 56, in test
    env.t.print_debug_replay()
AttributeError: 'MahjongPyWrapper.Table' object has no attribute 'print_debug_replay'

你可以试下python3.7或者3.8吗?

Sorry回复的较晚
版本不一致的问题,更新到v1.0.3