PyPokerGUI
PyPokerGUI copied to clipboard
TypeError: slice indices must be integers or None or have an __index__ method
File "c:\users\caocao\anaconda3\lib\site-packages\pypokergui\server\message_manager.py", line 82, in broadcast_update_game message = _gen_game_update_message(handler, update) File "c:\users\caocao\anaconda3\lib\site-packages\pypokergui\server\message_manager.py", line 114, in _gen_game_update_message table_html_str = handler.render_string("round_state.html", round_state=round_state) File "c:\users\caocao\anaconda3\lib\site-packages\tornado\web.py", line 826, in render_string return t.generate(**namespace) File "c:\users\caocao\anaconda3\lib\site-packages\tornado\template.py", line 348, in generate return execute() File "round_state_html.generated.py", line 53, in _tt_execute for idx, player in zip(range(len(round_state['seats']))[:len(round_state['seats'])/2], round_state['seats']): # round_state.html:22 TypeError: slice indices must be integers or None or have an index method
I have come across the same issue. Do you find how to solve it? Thanks.
https://github.com/ishikota/PyPokerGUI/issues/6
Well yesterday I tried to get the whole SW to work cause it's a great project :) Unfortunately, this error is still a thing in the official currently released version.
I tried to apply the fix given in this issue description and It brang the template back to life. However, since applying the bugfix no players (and their current action) are shown in the GUI on the website. It looks like this:
I wasn't able to dive deep into the python template because it's a hackish (but cool) functional expression. But the current result is that no html for the players is created .
Does someone encounter the same problems? Does anyone solved this already in more detail? If not, I will dive more deeper when there is more time for this on my side.
Best,
Dan
Ok guys I found the error, it's quite simple. I must have deleted accidentally the
{% include "player_game.html" %}
which needs to be put in between the fix #6 and
{% end %}
So the software is working using the proposed fix #6.
Ok guys I found the error, it's quite simple. I must have deleted accidentally the
{% include "player_game.html" %}
which needs to be put in between the fix #6 and
{% end %}
So the software is working using the proposed fix #6.
Thanks but I still get the same error, which sentence and which file exactly should we correct? The error shown here is still "string indices must be integers"