Comments (16)
What's your python version?
from chatgpt-discord-bot.
Version is 3.10.6
from chatgpt-discord-bot.
You did pip install -r requirements.txt
?
from chatgpt-discord-bot.
yes
from chatgpt-discord-bot.
Help me check out your discord.py version
pip show discord
from chatgpt-discord-bot.
Version: 2.1.0
from chatgpt-discord-bot.
Version: 2.1.0
I have updated the latest version and you can try, removing from discord import app_commands
in bot.py
as it is not being used
from chatgpt-discord-bot.
The first error went away, but the next error appeared
File "/opt/chatgpt2/main.py", line 4, in <module> bot.run_discord_bot() File "/opt/chatgpt2/src/bot.py", line 83, in run_discord_bot @client.tree.command(name="chat", description="Have a chat with ChatGPT") AttributeError: 'Bot' object has no attribute 'tree'
from chatgpt-discord-bot.
The first error went away, but the next error appeared
File "/opt/chatgpt2/main.py", line 4, in <module> bot.run_discord_bot() File "/opt/chatgpt2/src/bot.py", line 83, in run_discord_bot @client.tree.command(name="chat", description="Have a chat with ChatGPT") AttributeError: 'Bot' object has no attribute 'tree'
I'm having a bit of difficulty reproducing this error locally
I tried 3.10.6 and didn't have any issues
Could you tell me your environment? And I will continue tracking on it
from chatgpt-discord-bot.
Ubuntu 22.04.1
Connected via remote desktop, for some reason I had to type Python3 instead of Python to run it, run as root user
from chatgpt-discord-bot.
"python main.py" is not executable
"python3 main.py" is executable
from chatgpt-discord-bot.
I see
from chatgpt-discord-bot.
Sorry! Maybe I did not communicate it properly! In my environment, if I use Python instead of Python3, I cannot run the program itself, so the error is based on the assumption that Python3 is used.
from chatgpt-discord-bot.
After initialization and downgrading to Ubuntu 20.04, these errors are gone.
from chatgpt-discord-bot.
Hi, I seem to get this error as well, and I can't resolve it on my own:
Traceback (most recent call last):
File "D:\Projects\PythonProjects\Bots\chatGPT-discord-bot\main.py", line 1, in <module>
from src import bot
File "D:\Projects\PythonProjects\Bots\chatGPT-discord-bot\src\bot.py", line 6, in <module>
from src.aclient import client
File "D:\Projects\PythonProjects\Bots\chatGPT-discord-bot\src\aclient.py", line 7, in <module>
from discord import app_commands
File "C:\Program Files\Python311\Lib\site-packages\discord\app_commands\__init__.py", line 12, in <module>
from .commands import *
File "C:\Program Files\Python311\Lib\site-packages\discord\app_commands\commands.py", line 50, in <module>
from ..enums import AppCommandOptionType, AppCommandType, ChannelType, Locale
ImportError: cannot import name 'AppCommandOptionType' from 'discord.enums' (C:\Users\thebl\AppData\Roaming\Python\Python311\site-packages\discord\enums.py)
Any suggestions?
Thanks
from chatgpt-discord-bot.
Hi, I seem to get this error as well, and I can't resolve it on my own:
Traceback (most recent call last): File "D:\Projects\PythonProjects\Bots\chatGPT-discord-bot\main.py", line 1, in <module> from src import bot File "D:\Projects\PythonProjects\Bots\chatGPT-discord-bot\src\bot.py", line 6, in <module> from src.aclient import client File "D:\Projects\PythonProjects\Bots\chatGPT-discord-bot\src\aclient.py", line 7, in <module> from discord import app_commands File "C:\Program Files\Python311\Lib\site-packages\discord\app_commands\__init__.py", line 12, in <module> from .commands import * File "C:\Program Files\Python311\Lib\site-packages\discord\app_commands\commands.py", line 50, in <module> from ..enums import AppCommandOptionType, AppCommandType, ChannelType, Locale ImportError: cannot import name 'AppCommandOptionType' from 'discord.enums' (C:\Users\thebl\AppData\Roaming\Python\Python311\site-packages\discord\enums.py)
Any suggestions?
Thanks
Also, these are the versions of stuff:
discord.py==2.2.2
python-dotenv==1.0.0
asgiref==3.6.0
openai==0.27.6
revChatGPT==5.0.2
GoogleBard==1.0.2
EdgeGPT==0.4.2
selenium==4.9.1
undetected-chromedriver==3.4.7
Python 3.11.3 (Also tried 3.9 with no luck)
Working on a Windows 11 x64 machine
from chatgpt-discord-bot.
Related Issues (20)
- Bard __Secure-1PSID does not end with a dot HOT 1
- chrome
- Add support for Gemini HOT 1
- Gemini [Create images failed: we can't create your images right now] HOT 6
- 2024-03-08 17:38:00 INFO discord.client logging in using static token Traceback (most recent call last): HOT 1
- draw image HOT 2
- https://chat.openai.com/api/auth/session HOT 1
- ClientResponseError: 401, message='Unauthorized', url=URL('https://chat.openai.com/backend-api/models') HOT 1
- You Provider isn't working HOT 1
- nothing works HOT 1
- [IDEA] Contribution Guide HOT 1
- [IDEA] Unit testing framework for bot
- Unable to block GPT-4 usage? HOT 1
- Mis-spelling error "gemeni" HOT 1
- CHINESE? HOT 4
- "MissingAuthError: Add a "api_key" or a .har file" ERROR EVEN IF "a.har" FILE IS PRESENT HOT 3
- Change API Key
- [IDEA] Add Customized Usage Permissions
- Chat prompts in the one channel the bot has access to stops working if a chat prompt is initiated from a channel it does not have access to HOT 1
- Cannot Connect To Host HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatgpt-discord-bot.