Giter VIP home page Giter VIP logo

Comments (16)

Zero6992 avatar Zero6992 commented on July 17, 2024

What's your python version?

from chatgpt-discord-bot.

Omupp avatar Omupp commented on July 17, 2024

Version is 3.10.6

from chatgpt-discord-bot.

Zero6992 avatar Zero6992 commented on July 17, 2024

You did pip install -r requirements.txt?

from chatgpt-discord-bot.

Omupp avatar Omupp commented on July 17, 2024

yes

from chatgpt-discord-bot.

Zero6992 avatar Zero6992 commented on July 17, 2024

Help me check out your discord.py version

pip show discord

from chatgpt-discord-bot.

Omupp avatar Omupp commented on July 17, 2024

Version: 2.1.0

from chatgpt-discord-bot.

Zero6992 avatar Zero6992 commented on July 17, 2024

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.

Omupp avatar Omupp commented on July 17, 2024

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.

Zero6992 avatar Zero6992 commented on July 17, 2024

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.

Omupp avatar Omupp commented on July 17, 2024

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.

Omupp avatar Omupp commented on July 17, 2024

"python main.py" is not executable
"python3 main.py" is executable

from chatgpt-discord-bot.

Zero6992 avatar Zero6992 commented on July 17, 2024

I see

from chatgpt-discord-bot.

Omupp avatar Omupp commented on July 17, 2024

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.

Omupp avatar Omupp commented on July 17, 2024

After initialization and downgrading to Ubuntu 20.04, these errors are gone.

from chatgpt-discord-bot.

CMOSfail avatar CMOSfail commented on July 17, 2024

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.

CMOSfail avatar CMOSfail commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.