How can this line raise an 'ValueError: Invalid format specifier' in python?

How can this line raise an 'ValueError: Invalid format specifier' in python?

我写了这行代码来格式化消息,但它给我这个错误:

Traceback (most recent call last):
  File "yes.py", line 221, in buy_stock
    message = f'{"action": "Bought {amount} stocks", "current-money": "{self.money}", "money-combined": "{self.money_combined}", "stocks" : "{self.stock_amount}"}'
ValueError: Invalid format specifier

写在python3.8,定义了所有的变量。 我试图以 json 格式制作此消息,以便我可以将其发送到服务器,该服务器对数据进行一些信息收集。

再用一对大括号括起来,如下图

message = f'{{"action": "Bought {amount} stocks", "current-money": "{self.money}", "money-combined": "{self.money_combined}", "stocks" : "{self.stock_amount}"}}'