Saya menggunakan sistem untuk mengawal permulaan dan penutupan automatik untuk pasaran dalam negeri, dan mungkin akan berfungsi dengan baik pada suatu hari nanti, tetapi kadang-kadang terdapat masalah seperti ini, apa sebabnya?
Traceback (most recent call last): File "<string>", line 982, in init_ctx File "<string>", line 119, in <module> File "<string>", line 65, in main File "<string>", line 27, in api URLError: <urlopen error [Errno 104] Connection reset by peer>
Sebahagian kod adalah seperti berikut: if currentime (()>0.2100 and currentime (() <0.2359 and currentwday (()!=6 and currentwday (()!=0 and status==False:# Bukan hujung minggu Setiap hari 8.55 hingga 3.01 menghidupkan robot
status=True
LogStatus("0.2100--0.2359,Restart")
robotftrade=api('RestartRobot',RobotFTrade)
Log (("robotftrade execution start, api==", robotftrade)
swtradetrade=api('RestartRobot',swTrade)
Log (("swtradetrade execution start,api==",swtradetrade)
Sleep(10000)
if currentime ((() <0.0855 or currentwday (()) ==== 6 or currentwday (()) ==== 0 and status ==== True: # kurang daripada 8:55 atau pada hari Sabtu atau Ahad berhenti robot
status=False
LogStatus("0.0000--0.900 or weekend,StopRobot")
robotftrade=api('StopRobot',RobotFTrade)
Log (("robotftrade tamat, api==", robotftrade)
swtradetrade=api('StopRobot',swTrade)
Log (("swtradetrade pelaksanaan berhenti,api==",swtradetrade)
Sleep(10000)
connection reset by peer 我也是出现这个问题 出现了策略就中断了呀 只能人工再去点击重启 这个要如何解决? 就是中断了能否自动再启动机器人???
- 1
