question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fatal crash on first startup, ./run.sh. "ERROR:root:Token required"

See original GitHub issue

I followed all the instructions in README but still get problems when starting. I tested this on a new Digital Ocean droplet running Ubuntu Focal. I have installed all the dependencies and setup python to run as python 3.8.5. All the packages and extra Ubuntu dependencies have been installed as well.

./run.sh:

Already up to date.
Installing dependencies from lock file

No dependencies to install or update

Installing the current project: TLE (0.1.0)
ujson module not found, using json
msgpack not installed, MsgPackSerializer unavailable
10-10-2020 13:27:30:WARNING:discord.client:PyNaCl is not installed, voice will NOT be supported
10-10-2020 13:27:30:INFO:root:Cogs loaded: Graphs, Contests, Logging, CacheControl, Dueling, Starboard, CSES, Codeforces, Handles, Meta
10-10-2020 13:27:30:INFO:discord.client:logging in using static token
10-10-2020 13:27:31:INFO:discord.gateway:Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6&compress=zlib-stream
10-10-2020 13:27:31:INFO:discord.gateway:Shard ID None has sent the IDENTIFY payload.
10-10-2020 13:27:31:INFO:discord.gateway:Shard ID None has connected to Gateway: ["gateway-prd-main-18ck",{"micros":69422,"calls":["discord-sessions-prd-2-32",{"micros":67670,"calls":["start_session",{"micros":51521,"calls":["api-prd-main-rgc6",{"micros":48946,"calls":["get_user",{"micros":3578},"add_authorized_ip",{"micros":4647},"get_guilds",{"micros":6731},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":10648,"calls":[]}]}]}] (Session ID: 58103df54cbcc9ac5ad1645f4681a2dd).
10-10-2020 13:27:33:INFO:RatingChangesCache:Ratings for 0 handles cached
10-10-2020 13:27:33:WARNING:RatingChangesCache:Rating changes cache on disk is empty. This must be populated manually before use.
10-10-2020 13:27:33:INFO:Task:Starting up task `RatingChangesCacheUpdate`.
10-10-2020 13:27:33:INFO:Task:Starting up task `RanklistCacheUpdate`.
10-10-2020 13:27:33:INFO:ContestCache:1364 contests fetched from disk
10-10-2020 13:27:33:INFO:EventSystem:Dispatching event `ContestListRefresh`
10-10-2020 13:27:33:INFO:Task:Starting up task `ContestCacheUpdate`.
10-10-2020 13:27:33:INFO:ProblemCache:5947 problems fetched from disk
10-10-2020 13:27:33:INFO:Task:Starting up task `ProblemCacheUpdate`.
10-10-2020 13:27:33:INFO:Task:Starting up task `ProblemsetCacheUpdate`.
10-10-2020 13:27:33:WARNING:tle.util.codeforces_common:JSON file containing contest writers not found
10-10-2020 13:27:33:INFO:Task:Starting up task `ContestCogUpdate`.
10-10-2020 13:27:33:INFO:Task:Starting up task `WatchRatedVCs`.
10-10-2020 13:27:33:Level 100:Logging:`*******************************************************************************`
10-10-2020 13:27:33:Level 100:Logging:`***                               Bot running                               ***`
10-10-2020 13:27:33:Level 100:Logging:`*******************************************************************************`
10-10-2020 13:27:33:INFO:Task:Starting up task `ProblemsetCacheUpdate`.
10-10-2020 13:27:33:INFO:Task:Starting up task `SetExUsersInactive`.
10-10-2020 13:27:33:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.list with {}
10-10-2020 13:27:33:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/problemset.problems with {}
10-10-2020 13:27:33:INFO:ProblemsetCache:Saved 0 problems to database.
10-10-2020 13:27:33:INFO:ProblemsetCache:0 new problems saved and 0 saved problems updated.
10-10-2020 13:27:34:INFO:ContestCache:1364 contests fetched from API
10-10-2020 13:27:34:INFO:ContestCache:1364 contests stored in database
10-10-2020 13:27:34:INFO:EventSystem:Dispatching event `ContestListRefresh`
10-10-2020 13:27:34:INFO:Task:Starting up task `RanklistCacheUpdate.MonitorActiveContests`.
10-10-2020 13:27:34:INFO:Contests:Refreshed cache
10-10-2020 13:27:34:INFO:Contests:Tasks for guild 758035380057407548 cleared
10-10-2020 13:27:34:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1308, 'showUnofficial': 'true'}
10-10-2020 13:27:34:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1308}
10-10-2020 13:27:35:INFO:ProblemCache:6417 problems fetched from API
10-10-2020 13:27:35:INFO:ProblemCache:Keeping 5947 problems
10-10-2020 13:27:35:INFO:ProblemCache:5947 problems stored in database
10-10-2020 13:27:35:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/user.ratedList with {'activeOnly': 'false'}
./run.sh: line 18: 194045 Killed                  FONTCONFIG_FILE=$PWD/extra/fonts.conf poetry run python -m tle

And when running FONTCONFIG_FILE=$PWD/extra/fonts.conf poetry run python -m tle:

ujson module not found, using json
msgpack not installed, MsgPackSerializer unavailable
ERROR:root:Token required

If the last line is referring to the bot token in environment, then something has to be wrong with the bot itself since I’ve included both the bot token and the logging channel ID.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
aryanc403commented, Oct 10, 2020

Why don’t you fix that bug in the script? On sidenote that script will magically start working again after a few hrs.

1reaction
algmyrcommented, Oct 10, 2020

Also, you should be fine with 1G of swap, 4G is pretty overkill. In any case, try running the bot itself. If the issue was memory running out it should be fine now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

linux - How to run a shell script at startup
First create your startup script @ /home/user/startup.sh, and make it executable chmod +x /home/user/startup.sh. Then set a crontab for it:
Read more >
Crash on startup or when opening files in Revit
Solution: Opening Revit or Model. First identify if the crash occurs when opening Revit by itself (without opening a Revit model). Crashes when ......
Read more >
Fatality and Injury Reporting System Tool (FIRST)
This query tool allows a user to construct customized queries from the Fatality Analysis Reporting System (FARS) and from the Crash Report ...
Read more >
6 Tips For Driving Again, After An Accident
Do write down how the accident happened from beginning to end /Don't keep it to yourself/Do bring another driver into the car with...
Read more >
What to Do After a Car Crash (for Teens)
Alex started panicking — and his first thought was "What do I do now? ... details on the crash and start feeling dizzy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found