Add ability for AI to enter a game in progress.
Opened this issue · 3 comments
20141115 11:50:22 web.server:DEBUG server:563: AI model 1 summoned for Room 2 Seat 1
20141115 11:50:22 geventwebsocket.handler:DEBUG handler:69: Initializing WebSocket
20141115 11:50:22 geventwebsocket.handler:DEBUG handler:101: Validating WebSocket request
20141115 11:50:22 geventwebsocket.handler:DEBUG handler:152: Attempting to upgrade connection
20141115 11:50:22 geventwebsocket.handler:DEBUG handler:225: WebSocket request accepted, switching protocols
20141115 11:50:22 web.server:DEBUG server:355: err in on_join(2, 1): ValueError('Target seat (1) is not available.',)
20141115 11:50:22 ai.base:ERROR base:164: err: ValueError('Target seat (1) is not available.',)
20141115 11:50:22 ai.base:ERROR base:165: dump: RandAI_1 []
Exception in thread Thread-31:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/mgaree/Programming/cinch/ai/RandAI.py", line 58, in __init__
self.start() # Blocks thread
File "/home/mgaree/Programming/cinch/ai/base.py", line 273, in start
self.socket.wait() # Blocks until self.stop()
File "/usr/lib/python2.7/site-packages/socketIO_client/__init__.py", line 176, in wait
self._process_events()
File "/usr/lib/python2.7/site-packages/socketIO_client/__init__.py", line 195, in _process_events
self._process_packet(packet)
File "/usr/lib/python2.7/site-packages/socketIO_client/__init__.py", line 203, in _process_packet
delegate(packet, namespace._find_event_callback)
File "/usr/lib/python2.7/site-packages/socketIO_client/__init__.py", line 328, in _on_event
find_event_callback(event)(*args)
File "/home/mgaree/Programming/cinch/ai/base.py", line 166, in on_err
log.error("gs: {0}".format(self.gs))
File "/home/mgaree/Programming/cinch/ai/base.py", line 65, in __repr__
val += name + ": " + str(getattr(self, name)) + "\n"
File "/home/mgaree/Programming/cinch/ai/base.py", line 65, in __repr__
val += name + ": " + str(getattr(self, name)) + "\n"
...........
File "/home/mgaree/Programming/cinch/ai/base.py", line 65, in __repr__
val += name + ": " + str(getattr(self, name)) + "\n"
RuntimeError: maximum recursion depth exceeded while calling a Python object
I saw this once or twice but couldn't reliably reproduce it by the time I realized where the failure was. Most of the time AI invites work for me. Do you know the sequence of events that caused this?
Series of events:
- Restart server
- Create new game with two AI (west and north)
- Use invite link to enter game with 2nd human
- Complete bidding and play one trick
- Exit to lobby from 2nd human (happened to be active player)
- Invite AI to empty seat from 1st human
- Crash occurs
On Sat, Nov 15, 2014 at 11:55 AM, JackieChiles notifications@github.com
wrote:
I saw this once or twice but couldn't reliably reproduce it by the time I
realized where the failure was. Most of the time AI invites work for me. Do
you know the sequence of events that caused this?—
Reply to this email directly or view it on GitHub
#175 (comment).
While AI still cannot be invited to a game in progress, I've fixed the code that was causing the crash (not yet merged with Master). Now the AI just does nothing, as expected.