Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

TypeError: 'NoneType' object is not iterable #29

Open
rocketinventor opened this issue Feb 24, 2017 · 2 comments
Open

TypeError: 'NoneType' object is not iterable #29

rocketinventor opened this issue Feb 24, 2017 · 2 comments

Comments

@rocketinventor
Copy link
Contributor

I noticed that when using the default (demo) instance, near the end of the game, instead of playing valid moves, I get the following error: TypeError: 'NoneType' object is not iterable. This is odd, because there are still areas on the board that can be played by white (but they are not getting played). Once this happens, the client-side ui starts to put down white stones instead of black ones. These sysmptoms are very similar to #26 and #27.

"POST /prediction HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask_cors/extension.py", line 188, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask_cors/extension.py", line 188, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/ubuntu/workspace/.betago/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/ubuntu/workspace/betago/betago/model.py", line 61, in next_move
    bot_row, bot_col = self.bot.select_move('w')
TypeError: 'NoneType' object is not iterable
@macfergus
Copy link
Collaborator

I guess there are two separate problems here. One, passing is a perfectly valid move, so the demo server should allow the bot to pass, and the client should handle that as well.

Two, the bot is passing when we wouldn't expect it to. Probably this is another example of game state getting out of sync (as referenced in #27), but it's also possible that the bot just has some dumb passing logic.

@rocketinventor
Copy link
Contributor Author

rocketinventor commented Feb 26, 2017

I think that you are right about the two problems. However, I think that #26 might (also) be the cause if there are stones/areas that the user captured but the server isn't recognizing.

ATM, there is no mechanism for either the user, or the server to pass 😞

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants