#TypeError send() got an unexpected keyword argument 'view'

1 messages · Page 1 of 1 (latest)

somber birch
#

Im including my Heroku logs
Hopefully this might shed some light on the issue

#
2022-07-22T11:59:57.389616+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/discord_components/dpy_overrides.py", line 350, in send_override
2022-07-22T11:59:57.389616+00:00 app[worker.1]:     return await send(channel, *args, **kwargs)
2022-07-22T11:59:57.389633+00:00 app[worker.1]: TypeError: send() got an unexpected keyword argument 'view'
2022-07-22T11:59:57.389645+00:00 app[worker.1]: 
2022-07-22T11:59:57.389606+00:00 app[worker.1]:     message = await ctx.send(embed = emb1, view = HelpView(ctx))
2022-07-22T11:59:57.389616+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/discord_components/dpy_overrides.py", line 350, in send_override
2022-07-22T11:59:57.389616+00:00 app[worker.1]:     return await send(channel, *args, **kwargs)
2022-07-22T11:59:57.389633+00:00 app[worker.1]: TypeError: send() got an unexpected keyword argument 'view'
2022-07-22T11:59:57.389645+00:00 app[worker.1]: 
uncut moss
#

Dev/local

somber birch
#

nope

somber birch
#

this has me puzzled :l

uncut moss
somber birch
#

on it

#
asyncpraw
asyncio
beautifulsoup4
lxml
discord-components
psycopg2
asyncpg
pillow```
uncut moss
#

Also what do u use discord-components for?

somber birch
#

oh lol

#

i didnt copy the whole thing

#

my bad, crud

#
asyncpraw
asyncio
beautifulsoup4
lxml
discord-components
psycopg2
asyncpg
pillow```
somber birch
uncut moss
somber birch
#

wasnt sure if i should/could remove it

somber birch
uncut moss
#

It's for components for dpy 1.7.3

somber birch
#

ah
understood

uncut moss
#

2.0 pycord and dpy both have built in components

somber birch
#

figures, since i didnt actually need to import the module anywhere

#

silly me :p

uncut moss
#

But i believe the real issue is that discord-components requires dpy which means that it causes some conflicting stuff which I believe is the cause of ur error

somber birch
#

lemme just rerun

#

give me a minute? ill just get back to you

uncut moss
#

I had the same issue with another lib, topggpy which required dpy but there was no issue on the local pc, it was only on the vps

uncut moss
somber birch
#

im deploying the new code, fingers crossed

uncut moss
#

🤞

somber birch
#

OH MY GOSH YOU ARE A GODSEND

#

IT WORKS!

uncut moss
#

You're welcome

somber birch
#

THANK YOU SO MUCH

uncut moss
#

:)

somber birch
#

😄

uncut moss
#

Glad to see it worked for you

somber birch
#

ive been working on this for sooooo long and it stopped working yesterday

im so glad it works now woo

#

thank you, again

#

is there a way to make this post a 'solved' post? like accepting the answer or something :p

uncut moss
#

Your welcome, happy to help

somber birch
#

okay like rn? here? got it

uncut moss
#

Yeah

valid treeBOT
#

This thread was archived by the user that opened it.

uncut moss
#

It closes the thread

somber birch
#

ayyyy thank you so much

uncut moss
#

I think I unarchived it by accident lol

somber birch
#

oops

#

closing it again ahh

#

Code runs fine on local device, but the moment i try to run the code from Heroku x Github, it throws up this error.

The supposedly erroneous line of code is this one
message = await ctx.send(embed = emb1, view = HelpView(ctx))
I've included a snip of what how the view is structured for more detail

hasty kernel
somber birch
steep hemlock
#

open the python interpreter, import discord and run discord.__version__

#
python3
>>> import discord
>>> discord.__version__
2.0.0
somber birch
#

okay I just did that

My discord version is 2.0.0rc1'

And its the same on my GitHub ProcFile

*I meant requirements file x_x

uncut moss
#

So you don't need to specify the version when installing pycord or in the requirements.txt file

somber birch
uncut moss
cinder bramble
#

pip install -U py-cord would be better

somber birch
#

OKAY understood :p

somber birch
#

its still throwing up the same error

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: send() got an unexpected keyword argument 'view'

#

message = await ctx.send(embed = emb1, view = HelpView(ctx))

cinder bramble
#

Uuh

modest zealot
somber birch
#

yes, sure

somber birch