Python psycopg2.ProgrammingError:can';t适应类型';设置';

Python psycopg2.ProgrammingError:can';t适应类型';设置';,python,discord,psycopg2,Python,Discord,Psycopg2,有一个不和谐的机器人。我不想为我的服务器创建。但我使用了psycopg2,因为我不想用它来创建项目和想法的列表。我得到了这个错误。编程错误:无法调整类型“set”这是我的代码: import psycopg2 import os from discord.ext import commands import discord conn = psycopg2.connect( host="ec2-3-216-92-193.compute-1.amazonaws.com&q

有一个不和谐的机器人。我不想为我的服务器创建。但我使用了psycopg2,因为我不想用它来创建项目和想法的列表。我得到了这个错误。编程错误:无法调整类型“set”这是我的代码:

import psycopg2
import os
from discord.ext import commands
import discord

conn = psycopg2.connect(
        host="ec2-3-216-92-193.compute-1.amazonaws.com",
        database="d1vpende403347",
        user="hnzgmwsoiogmmt",
        password="86bfca0c982e04ae0ca6e6f4d1f4fb03ca5f4f4cb9a911672fa993a300e7ea0e",
        port=5432)
bot=discord.Client()
bot=commands.Bot(command_prefix="!")
cursor=conn.cursor()

@bot.command()
async def rules(ctx):
    await ctx.send("1. To enter our server, you have of course to learn python and some libraries, for example: 'discord.py', 'django'.\n2. No insults or bad words.\n3.Enjoy it.")
@bot.command()
async def new(ctx, author:discord.Member, project):
    name=author.display_name
    await ctx.send(f"There is your entry: The author: {name} , project: {project}")
    cursor.execute(f"INSERT INTO ideas(author,project) VALUES(%s,%s)",({name},{project}))
    await ctx.send("The entry was succesfully added""")

print("And There it is, you're connected")

TOKEN=os.environ.get("DISCORD_BOT_SECRET")
bot.run(TOKEN)

cursor.close()
conn.close()

谢谢回复

这是否回答了您的问题?不,我找到答案了,是答案
import psycopg2
import os
from discord.ext import commands
import discord

conn = psycopg2.connect(
        host="ec2-3-216-92-193.compute-1.amazonaws.com",
        database="d1vpende403347",
        user="hnzgmwsoiogmmt",
        password="86bfca0c982e04ae0ca6e6f4d1f4fb03ca5f4f4cb9a911672fa993a300e7ea0e",
        port=5432)
bot=discord.Client()
bot=commands.Bot(command_prefix="!")
cursor=conn.cursor()

@bot.command()
async def rules(ctx):
    await ctx.send("1. To enter our server, you have of course to learn python and some libraries, for example: 'discord.py', 'django'.\n2. No insults or bad words.\n3.Enjoy it.")
@bot.command()
async def new(ctx, author:discord.Member, project):
    name=author.display_name
    await ctx.send(f"There is your entry: The author: {name} , project: {project}")
    cursor.execute(f"INSERT INTO ideas(author,project) VALUES(%s,%s)",(name,project))
    await ctx.send("The entry was succesfully added""")

print("And There it is, you're connected")

TOKEN=os.environ.get("DISCORD_BOT_SECRET")
bot.run(TOKEN)

cursor.close()
conn.close()