Startup errors
Closed this issue · 2 comments
All of this is unfortunately mostly gibberish to me. But my discord bot doesn't join the discord, so I figure its not working
C:\discordbot\DiscordBot-EdgeGPT-1.1.4>python bot.py
Python-dotenv could not parse statement starting at line 14
[2024-04-02 20:34:41] [INFO ] discord.client: logging in using static token
[2024-04-02 20:34:42] [INFO ] discord.gateway: Shard ID None has connected to Gateway (Session ID: c002271294274e64ba4722cb412694bc).
[2024-04-02 20:34:44] [ERROR ] discord.client: Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\site-packages\discord\ext\commands\bot.py", line 935, in _load_from_module_spec
spec.loader.exec_module(lib) # type: ignore
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\discordbot\DiscordBot-EdgeGPT-1.1.4\cogs\edgegpt.py", line 7, in
from src.user_chatbot import set_chatbot, get_users_chatbot, set_dalle3_unofficial_apikey
File "C:\discordbot\DiscordBot-EdgeGPT-1.1.4\src\user_chatbot.py", line 6, in
from .bing_chat.jail_break import sydney
File "C:\discordbot\DiscordBot-EdgeGPT-1.1.4\src\bing_chat\jail_break\sydney.py", line 213, in
proxy: str | None = _PROXY,
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\site-packages\discord\client.py", line 441, in _run_event
await coro(*args, **kwargs)
File "C:\discordbot\DiscordBot-EdgeGPT-1.1.4\bot.py", line 36, in on_ready
await bot.load_extension(f'cogs.{Filename[:-3]}')
File "C:\Program Files\Python39\lib\site-packages\discord\ext\commands\bot.py", line 1013, in load_extension
await self._load_from_module_spec(spec, name)
File "C:\Program Files\Python39\lib\site-packages\discord\ext\commands\bot.py", line 938, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.edgegpt' raised an error: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Any help is appreciated
Use "pip show python-dotenv" to confirm that dotnev was installed successfully. Then make sure your python version is 3.10+.
Use "pip show python-dotenv" to confirm that dotnev was installed successfully. Then make sure your python version is 3.10+.
After a few hiccups Its now working fine. Turns out I had 3.9 installed, promptly upgraded and reinstalled. Works a charm!
Thank you :)