#Some errors while starting

1 messages · Page 1 of 1 (latest)

elder haven
covert root
#
Your bot is up-to-date! - v2.7.1
[2025-05-24 12:01:19] [INFO    ] discord.client: logging in using static token
Traceback (most recent call last):
  File "C:\Users\azmathvn\Desktop\isaithalaivitest\main.py", line 247, in <module>
    bot.run(func.settings.token, root_logger=True)
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\azmathvn\AppData\Roaming\Python\Python313\site-packages\discord\client.py", line 906, in run
    asyncio.run(runner())
    ~~~~~~~~~~~^^^^^^^^^^
  File "C:\Program Files\Python313\Lib\asyncio\runners.py", line 195, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "C:\Program Files\Python313\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Program Files\Python313\Lib\asyncio\base_events.py", line 719, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "C:\Users\azmathvn\AppData\Roaming\Python\Python313\site-packages\discord\client.py", line 895, in runner
    await self.start(token, reconnect=reconnect)
  File "C:\Users\azmathvn\AppData\Roaming\Python\Python313\site-packages\discord\client.py", line 823, in start
    await self.login(token)
  File "C:\Users\azmathvn\AppData\Roaming\Python\Python313\site-packages\discord\client.py", line 649, in login
    raise TypeError(f'expected token to be a str, received {token.__class__.__name__} instead')
TypeError: expected token to be a str, received NoneType instead```

This is the clear error
elder haven
#

Is the bot token you're using correct? Maybe you're using the wrong one?

#

There has to be something wrong with configuration

covert root
elder haven
#

I think only Choco can help you. I don't know how to debug this bot

covert root
#

ok

delicate badge
#

they are a syntax error in your settings.json

covert root
#

😦

#

it is valid

delicate badge
#

same error?

covert root
#

yes 😦

delicate badge
#

but this error means you have a syntax error in your settings.json

covert root
#

this is the settings.json

#

i didnt change anything

#

just downloaded from git

#

changed only token

delicate badge
#

umm can you try with python 3.12 instead of 3.13

covert root
#

ok i will try

amber sinew
#

@covert root I was having this same error last night

#

100% a bot token issue

novel creek
amber sinew
amber sinew
#

Where are you hosting