dolfies / discord.py-self

A fork of the popular discord.py for user accounts.
https://discordpy-self.rtfd.io/en/latest/
MIT License
665 stars 155 forks source link

Error when launching via the new version of the module #492

Closed xYanzu closed 1 year ago

xYanzu commented 1 year ago

Summary

Error when launching via the new version of the module

Reproduction Steps

pip install git+https://github.com/dolfies/discord.py-self.git

python3 main.py

When I run my code with version 2.0.0 of the module, an error appears here:

Traceback (most recent call last): File "/home/yanzu/Bureau/Core Project/main.py", line 3, in import discord File "/home/yanzu/.local/lib/python3.10/site-packages/discord/init.py", line 22, in from . import abc as abc, opus as opus, utils as utils File "/home/yanzu/.local/lib/python3.10/site-packages/discord/abc.py", line 62, in from .commands import ApplicationCommand, BaseCommand, SlashCommand, UserCommand, MessageCommand, _command_factory File "/home/yanzu/.local/lib/python3.10/site-packages/discord/commands/init.py", line 26, in from .context import * File "/home/yanzu/.local/lib/python3.10/site-packages/discord/commands/context.py", line 30, in from discord.interactions import InteractionMessage, InteractionResponse, Interaction ImportError: cannot import name 'InteractionMessage' from 'discord.interactions' (/home/yanzu/.local/lib/python3.10/site-packages/discord/interactions.py)

Code

No response

Expected Results

Run my script

Actual Results

An error appears

System Information

Checklist

Additional Information

No response

dolfies commented 1 year ago

You seem to have multiple conflicting packages using the discord namespace in the same environment. Uninstall them all, and reinstall this library. If you want to use this library with upstream, see the relevant section in the README.

xYanzu commented 1 year ago

I only have discord.py-self installed

xYanzu commented 1 year ago

??

dolfies commented 1 year ago

Your traceback proves that is not the case. Even if it is true now, it wasn't when you installed the library overtop an existing package. You need to uninstall everything using the discord namespace in the environment and reinstall the library.

xCoreProject commented 1 year ago

With version 1.9.2 the script works perfectly, but when I update the module the error appears

xYanzu commented 1 year ago

???