ContentTypeError:0,message ='试图使用意外的mimetype解码JSON

async def uuid(ctx, *, message): # b'\xfc'
await ctx.message.delete()
q = urlencode({"q":message})
async with aiohttp.ClientSession()as session:
    async with session.get(f'https://api.mojang.com/users/profiles/minecraft/{q}') as resp:
         r = await resp.json(content_type='custom/type')
await ctx.send(r["id"])

我不断收到此错误,我已经通过使用application / json尝试了多种方法,但是我一直收到相同的错误

[ERROR]: Command raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.mojang.com/users/profiles/minecraft/q=5929')
评论