Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法创建新人物和地图 #10

Open
lzw2000118 opened this issue Aug 26, 2023 · 4 comments
Open

无法创建新人物和地图 #10

lzw2000118 opened this issue Aug 26, 2023 · 4 comments

Comments

@lzw2000118
Copy link

您好,请问一下我这边为啥点击创建的按钮没法点击,只能移动mayor,右下角+-可以点 其他都点不了 只有一个mayor角色,
以下为启动python -u tick.py的nohup日志
process id: 2225427
process python server killed
process python server restarted
----------Server Started----------
tail: nohup.log: file truncated
----------Server Started----------
somebody linked.
tick-10001 logging in at 2023-08-26 15:30:20
tick-10001 send: {"uid":"tick-10001","uri":"ping","method":"GET","data":{}}
tick-10001 send: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
before solving using: set()
before solving chatted: set()
before solving movings: set()
before solving inited: set()
before solving cache: []
movings: set()
cache: []
inited: set()
using: set()
chatted: set()
tick-10001 send: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
before solving using: set()
before solving chatted: set()
before solving movings: set()
before solving inited: set()
before solving cache: []
movings: set()
.......

以下为启动python -u tick.py的日志
['tick.py']
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Send: {"uid":"tick-10001","uri":"ping","method":"GET","data":{}}
Received: {"code": 200, "uri": "welcome", "msg": "Welcome"}
Received: {"code":200,"data":{"register":true,"ping":true},"uid":"tick-10001","msg":"","uri":"ping"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Sending: {"uid":"tick-10001","uri":"command.timetick.Tick","method":"POST"}
Received: {"code":200,"data":{"moving":0,"chatted":0,"using":0,"inited":0,"cache":0},"uid":"tick-10001","msg":"","uri":"command.timetick.Tick"}
Send: {"uid":"tick-10001","uri":"ping","method":"GET","data":{}}
Received: {"code":200,"data":{"ping":true},"uid":"tick-10001","msg":"","uri":"ping"}.........

另开一个窗口启动python -u mayor.py只显示['mayor.py']
logs下面没有文件
~/logs/agent_name_prompt.txt 这个文件也没有产生

@py499372727
Copy link
Owner

There are many reasons for this phenomenon, but it can usually be divided into the following two categories. Firstly, please check whether the server and client have successfully connected to the relevant data, such as listening to the return values of the relevant ports. We strongly recommend not deploying to remote servers and internal network environments, as some ports may be modified. Secondly, sometimes similar situations may occur when connecting to openAI servers. Please check your API at this time_ The bill of the key and the proxy of the network.

@chengming1108
Copy link

哈喽 请问您解决了吗 我也遇到相同的问题了。如果您解决了此问题希望能得到答案

@akabbks
Copy link

akabbks commented Sep 13, 2023

Exception in callback functools.partial(<function WebSocketProtocol._run_callback.. at 0x000001DC6D32C940>, <Task finished name='Task-6' coro=<WebSocketHandler.on_message() done, defined at D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\main.py:23> exception=IndexError('list index out of range')>)
Traceback (most recent call last):
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\ioloop.py", line 738, in _run_callback
ret = callback()
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 639, in
self.stream.io_loop.add_future(result, lambda f: f.result())
File "D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\main.py", line 24, in on_message
await self.app_cache.execute(self, message)
File "D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\app.py", line 181, in execute
res = await cmd._execute(info)
File "D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\command\command_base.py", line 32, in _execute
self.id = int(token.split('-')[1])
IndexError: list index out of range
Uncaught exception GET /ws (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8000', method='GET', uri='/ws', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\web.py", line 1786, in _execute
result = await result
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 272, in get
await self.ws_connection.accept_connection(self)
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 862, in accept_connection
await self._accept_connection(handler)
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 945, in _accept_connection
await self._receive_frame_loop()
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 1101, in _receive_frame_loop
await self._receive_frame()
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 1192, in _receive_frame
await handled_future
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\ioloop.py", line 738, in _run_callback
ret = callback()
File "C:\Users\bbks525\AppData\Roaming\Python\Python39\site-packages\tornado\websocket.py", line 639, in
self.stream.io_loop.add_future(result, lambda f: f.result())
File "D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\main.py", line 24, in on_message
await self.app_cache.execute(self, message)
File "D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\app.py", line 181, in execute
res = await cmd._execute(info)
File "D:\HuaweiMoveData\Users\bbks525\Desktop\AgentSims-main (1)\AgentSims-main\command\command_base.py", line 32, in _execute
self.id = int(token.split('-')[1])
IndexError: list index out of range

@py499372727
Copy link
Owner

The original issue was ultimately determined to be caused by problems related to the OpenAI API. The latest traceback appears inconsistent with the original problem. This seems to be due to system issues or Mysql version problems leading to incorrectly formatted playerID being stored in the database. I suggest checking the Mysql version or trying deployment on a MacOS or Linux system instead. We have not tested for bugs specific to Windows deployments.

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

No branches or pull requests

4 participants