#SyncWarning: Failed to overwrite global commands due to 'flag_value' object has no attribute 'values

1 messages · Page 1 of 1 (latest)

static canopy
#

Hello,
yesterday I finished a bot, but when I launch it, this appears and only some cogs are loaded. I don't understand this error, this is first time after 1 year me getting this error. Does somebody know, what does it mean?

stable ibex
#

send full traceback

static canopy
#

ok wait

#
C:\Users\\AppData\Local\Programs\Python\Python312\Lib\site-packages\disnake\ext\commands\common_bot_base.py:321: RuntimeWarning: coroutine 'setup' was never awaited
  setup(self)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Successfully loaded cogs.maps!
Successfully loaded cogs.players!
Successfully loaded cogs.help!
Successfully loaded cogs.rolelist!
Successfully loaded cogs.leaderboard!
Successfully loaded cogs.autorespond!
C:\Users\\AppData\Local\Programs\Python\Python312\Lib\site-packages\disnake\ext\commands\interaction_bot_base.py:913: SyncWarning: Failed to overwrite global commands due to 'flag_value' object has no attribute 'values'
  warnings.warn(
sturdy pecan
#

might be related to contexts or install_types on some command, make sure you're passing the right object there

static canopy
#

Might be contexts, because Im used to use dm_permission

#

But that returned error

#

And I changed it to this: contexts=InteractionContextTypes.guild

#

dont know if its correct

misty roost
#

Try InteractionContextTypes(guild=True), this should give InteractionContextTypes instance instead of flag_value

static canopy
#

i will try to change in all cogs

#

nope still

#

C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages\disnake\ext\commands\interaction_bot_base.py:913: SyncWarning: Failed to overwrite global commands due to 'flag_value' object has no attribute 'values'
warnings.warn(
ping me please so i see new messages

covert vapor
#

It's a flag enum thing, the parameter expects an instance of it, but the attribute isn't one

#

Try InteractionContextTypes(guild=True)

#

right I can't read

covert vapor
static canopy
#

yeah i really i do, i changed everywhere expect main bot's class...

#

but yeah it works now, i got only choices errors now, thanks for help guys

analog vigilBOT
#
Solved!

Marked the thread as solved. If your question has not been answered, please open a new thread in #1019642966526140566.