TypeError: cannot concatenate 'str' and 'dict' objects

前端 未结 2 1214
情歌与酒
情歌与酒 2021-01-15 15:22

I am a novice in the field, and I wanted to create a program that was useful and fast handling, and run this script, I get this error, and I could not get this error.

<
2条回答
  •  轮回少年
    2021-01-15 16:18

    the error message should be clear, you can't use + operator to sum a string and a dictionary, maybe you want to convert the dict to a string. If getFTPConfig('Pass') is returning a dictionary then

    str(getFTPConfig('Pass'))+"whatever"
    

提交回复
热议问题