FuseFairy / DiscordBot-EdgeGPT

Using Copilot, Bing Image Creator and DALLE-3 on Discord bot.
GNU General Public License v2.0
160 stars 41 forks source link

i can't run the code #125

Closed GasmiAbdou closed 7 months ago

GasmiAbdou commented 9 months ago

i installed all requirements and when i did python bot.py i got this in VSC :

PS C:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main> c:; cd 'c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main'; & 'C:\Users\MSI-PC\AppData\Local\Programs\Python\Python310\python.exe' 'c:\Users\MSI-PC.vscode\extensions\ms-python.python-2023.22.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '56240' '--' 'c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\bot.py' Traceback (most recent call last): File "c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\bot.py", line 7, in from cogs.event import set_chatbot File "c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\cogs\event.py", line 12, in from src import log ImportError: cannot import name 'log' from 'src' (C:\Users\MSI-PC\AppData\Local\Programs\Python\Python310\lib\site-packages\src__init__.py) PS C:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main>

FuseFairy commented 9 months ago

Change cogs\event.py line12 -> from src.log import setup_logger

GasmiAbdou commented 9 months ago

@FuseFairy Traceback (most recent call last): File "c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\bot.py", line 7, in from cogs.event import set_chatbot File "c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\cogs\event.py", line 12, in from src.log import setup_logger ModuleNotFoundError: No module named 'src.log' stilll

FuseFairy commented 9 months ago

Strange, because src\log.py exists

GasmiAbdou commented 9 months ago

support server plz @FuseFairy

FuseFairy commented 9 months ago

@FuseFairy Traceback (most recent call last): File "c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\bot.py", line 7, in from cogs.event import set_chatbot File "c:\Users\MSI-PC\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\cogs\event.py", line 12, in from src.log import setup_logger ModuleNotFoundError: No module named 'src.log' stilll

This is not a problem with the code, but with your environment setup. At least I can confirm that it can run normally on localhost or fly.io

FuseFairy commented 9 months ago

@GasmiAbdou Try using Docker to run the bot

GasmiAbdou commented 9 months ago

@FuseFairy try to run it on replit and see the issue there s a bug !! broo

FuseFairy commented 9 months ago

Create an empty __init__.pyfile in the src folder and it will run fine. image

GasmiAbdou commented 9 months ago

the issue still !! plase can you send me that replit project just to fork it !

FuseFairy commented 9 months ago

https://replit.com/@dd8611706/DiscordBot-EdgeGPT

astrotically commented 8 months ago

used the repl above ^ and got this error, what should i do? please reply asap!

/nix/store/8w6mm5q1n7i7cs1933im5vkbgvjlglfn-python3-3.10.13/bin/python3: can't open file '/home/runner/DiscordBot-EdgeGPT/main.py': [Errno 2] No such file or directory