Not enough arguments for format string

前端 未结 2 1699
抹茶落季
抹茶落季 2021-02-13 13:03

I have such code in Python:

def send_start(self, player):
    for p in self.players:
        player[\"socket\"].send_cmd(\'

        
2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-13 13:42

    EDIT: Disregard this answer, it cannot be the problem. Keeping for the comments.

    Try if replacing

    (self.turnnow)
    

    with

    (self.turnnow,)
    

    helps (i.e. adding a trailing comma). The way it is now that's not a tuple and parens are merely decorative. Might not be the case since you didn't provide line number — have to guess.

提交回复
热议问题