#TypeError send() got an unexpected keyword argument 'view'
1 messages · Page 1 of 1 (latest)
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]:
There's no issue on the dev build right?
Dev/local
nope
local build works like a charm
this has me puzzled :l
Send ur requirements.txt file
on it
asyncpraw
asyncio
beautifulsoup4
lxml
discord-components
psycopg2
asyncpg
pillow```
Uh why isn't pycord in the reqs?
Also what do u use discord-components for?
oh lol
i didnt copy the whole thing
my bad, crud
asyncpraw
asyncio
beautifulsoup4
lxml
discord-components
psycopg2
asyncpg
pillow```
i migrated from dpy to pycord, because buttons were tedious to use
thats where discord-components came in
Remove it from the reqs, you don't need ut
wasnt sure if i should/could remove it
aight!
It's for components for dpy 1.7.3
ah
understood
2.0 pycord and dpy both have built in components
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
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
Yeah sure
🤞
You're welcome
THANK YOU SO MUCH
:)
😄
Glad to see it worked for you
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
Your welcome, happy to help
/close
okay like rn? here? got it
Yeah
This thread was archived by the user that opened it.
It closes the thread
ayyyy thank you so much
I think I unarchived it by accident lol
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
what is discord.__version__ from the machine your bot runs on
How do I check that?
open the python interpreter, import discord and run discord.__version__
python3
>>> import discord
>>> discord.__version__
2.0.0
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
Switch the version to 2.0 stable
So you don't need to specify the version when installing pycord or in the requirements.txt file
how do i do that? :p
If u just run pip install py-cord it will install that by default now that 2.0 has been fully released so use that instead of rc1
pip install -U py-cord would be better
OKAY understood :p
ill do this, then
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))
Uuh
can you show the part where you have this line
yes, sure
if you want i can just send you the whole cog
but i wont unless you say so.
sending a screenshot of the code right now
these lines are outside the view, and aren't part of any button callback