ImportError: cannot import name 'create_settings_activity' from 'discord.activity'
See original GitHub issueSummary
Whenever I try to import discord, it errors and which prevents me from finishing what I’m currently working on.
Reproduction Steps
import discord
Code
import discord
from discord.ext import commands
Expected Results
It’s supposed to import discord without any errors.
Actual Results
It errors while importing discord.
System Information
Can’t run it because discord.py-self errors, I also get an error when I run that command in my venv.
Normal Discord.py -
- Python v3.9.5-final
- discord.py v1.7.3-final
- aiohttp v3.7.4.post0
- system info: Linux 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021
I’m currently using the discord.py-self@rebase version (discord.py-self-2.0.0a1).
Checklist
- I have searched the open issues for duplicates.
- I have shared the entire traceback.
- I am using a user token (and it isn’t visible in the code).
Additional Information
When installing the library, I’m using the same version of python and such too.
Collecting git+https://github.com/dolfies/discord.py-self@rebase
Cloning https://github.com/dolfies/discord.py-self (to revision rebase) to /tmp/pip-req-build-cvo3zsw3
Running command git clone -q https://github.com/dolfies/discord.py-self /tmp/pip-req-build-cvo3zsw3
Running command git checkout -b rebase --track origin/rebase
Switched to a new branch 'rebase'
Branch 'rebase' set up to track remote branch 'rebase' from 'origin'.
Requirement already satisfied: aiohttp<3.8.0,>=3.6.0 in ./venv/lib/python3.9/site-packages (from discord.py-self==2.0.0a1) (3.7.4.post0)
Requirement already satisfied: multidict<7.0,>=4.5 in ./venv/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (5.2.0)
Requirement already satisfied: typing-extensions>=3.6.5 in ./venv/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (4.0.1)
Requirement already satisfied: chardet<5.0,>=2.0 in ./venv/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (4.0.0)
Requirement already satisfied: attrs>=17.3.0 in ./venv/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (21.2.0)
Requirement already satisfied: yarl<2.0,>=1.0 in ./venv/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (1.7.2)
Requirement already satisfied: async-timeout<4.0,>=3.0 in ./venv/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (3.0.1)
Requirement already satisfied: idna>=2.0 in ./venv/lib/python3.9/site-packages (from yarl<2.0,>=1.0->aiohttp<3.8.0,>=3.6.0->discord.py-self==2.0.0a1) (3.3)
Building wheels for collected packages: discord.py-self
Building wheel for discord.py-self (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /root/code/mSelfbot/venv/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-cvo3zsw3/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-cvo3zsw3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rni4t31q
cwd: /tmp/pip-req-build-cvo3zsw3/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for discord.py-self
Running setup.py clean for discord.py-self
Failed to build discord.py-self
Installing collected packages: discord.py-self
Running setup.py install for discord.py-self ... done
Successfully installed discord.py-self-2.0.0a1
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
ImportError: cannot import name 'Option' from 'discord'
Show activity on this post. You need to install the developer version of pycord... pip install git+https://github.com/Pycord-Development/ ...
Read more >cannot import name 'Type' #1597 - Rapptz/discord.py · GitHub
This error is due to changes in async_timeout, a dependency for aiohttp, which itself is a dependency for discord.py. Although aiohttp is pinned ......
Read more >Fix Discord Game Activity Not Showing 2022 - YouTube
Here's how to fix discord activities not showing. This error is searched as discord game activity not showing. And in this video I...
Read more >Games on Discord | Activate Activities on YOUR SERVER
Discord Activities (or Games in Voice Chat) are here! You can play Minigolf, Chess, Checkers, ... Your browser can't play this video.
Read more >cannot import name 'option' from 'discord' - You.com | The AI ...
I answered this on Discord, but it's good to have the information out there, the error indicates a circular file import between your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve been busy the past few days, so haven’t been able to touch code. Will be fixed soon.
Fixed, looks like it was something with my pip cache as
git clone
andpip install git+
worked on other devices, thanks!