Issue with running bot on Heroku.
FunnyCakes opened this issue · 3 comments
FunnyCakes commented
I recently got Heroku and tried to install this lichess bot on it to run 24/7 but when I run it, it says this. (with verbose logging)
I used these exact files on my mac and it worked so, please help.
[02/01/23 01:26:59] INFO lichess-bot.py:722
. _/|
. // o\
. || ._) lichess-bot 2023.1.6.2
. //__\
. )___( Play on Lichess
with a bot
DEBUG Config: config.py:160
token: logger
url: https://lichess.org/
engine:
dir: ./engines/
name: stockfish
working_dir: ''
protocol: uci
ponder: true
polyglot:
enabled: false
book:
standard:
- engines/book1.bin
- engines/book2.bin
min_weight: 1
selection: weighted_random
max_depth: 8
draw_or_resign:
resign_enabled: false
resign_score: -1000
resign_for_egtb_minus_two: true
resign_moves: 3
offer_draw_enabled: false
offer_draw_score: 0
offer_draw_for_egtb_zero: true
offer_draw_moves: 5
offer_draw_pieces: 10
online_moves:
max_out_of_book_moves: 10
max_retries: 2
chessdb_book:
enabled: false
min_time: 20
move_quality: good
min_depth: 20
contribute: true
lichess_cloud_analysis:
enabled: false
min_time: 20
move_quality: good
max_score_difference: 50
min_depth: 20
min_knodes: 0
online_egtb:
enabled: false
min_time: 20
max_pieces: 7
source: lichess
move_quality: best
lichess_bot_tbs:
syzygy:
enabled: false
paths:
- engines/syzygy
max_pieces: 7
move_quality: best
gaviota:
enabled: false
paths:
- engines/gaviota
max_pieces: 5
min_dtm_to_consider_as_wdl_1:
120
move_quality: best
homemade_options: null
uci_options:
Move Overhead: 100
Threads: 4
Hash: 2048
SyzygyPath: ./syzygy/
silence_stderr: false
abort_time: 20
fake_think_time: false
rate_limiting_delay: 0
move_overhead: 2000
correspondence:
move_time: 5
checkin_period: 30
disconnect_time: 300
ponder: false
challenge:
concurrency: 1
sort_by: best
accept_bot: false
only_bot: false
max_increment: 180
min_increment: 0
max_base: 315360000
min_base: 0
max_days: 14
min_days: 1
variants:
- standard
time_controls:
- bullet
- blitz
- rapid
modes:
- casual
- rated
greeting:
hello: Hi! I'm {me}. Good luck!
Type !help for a list of commands I
can respond
to.
goodbye: Good game!
hello_spectators: Hi! I'm {me}.
Type !help for a list of commands I
can respond
to.
goodbye_spectators: Thanks for
watching!
matchmaking:
allow_matchmaking: false
challenge_variant: random
challenge_timeout: 30
challenge_initial_time:
- 60
- 120
challenge_increment:
- 1
- 2
opponent_rating_difference: 100
opponent_allow_tos_violation: true
challenge_mode: random
delay_after_decline: none
DEBUG ==================== config.py:161
DEBUG Config: config.py:160
token: logger
url: https://lichess.org/
engine:
dir: ./engines/
name: stockfish
working_dir: /app
protocol: uci
ponder: true
polyglot:
enabled: false
book:
standard:
- engines/book1.bin
- engines/book2.bin
min_weight: 1
selection: weighted_random
max_depth: 8
draw_or_resign:
resign_enabled: false
resign_score: -1000
resign_for_egtb_minus_two: true
resign_moves: 3
offer_draw_enabled: false
offer_draw_score: 0
offer_draw_for_egtb_zero: true
offer_draw_moves: 5
offer_draw_pieces: 10
online_moves:
max_out_of_book_moves: 10
max_retries: 2
chessdb_book:
enabled: false
min_time: 20
move_quality: good
min_depth: 20
contribute: true
lichess_cloud_analysis:
enabled: false
min_time: 20
move_quality: good
max_score_difference: 50
min_depth: 20
min_knodes: 0
online_egtb:
enabled: false
min_time: 20
max_pieces: 7
source: lichess
move_quality: best
lichess_bot_tbs:
syzygy:
enabled: false
paths:
- engines/syzygy
max_pieces: 7
move_quality: best
gaviota:
enabled: false
paths:
- engines/gaviota
max_pieces: 5
min_dtm_to_consider_as_wdl_1:
120
move_quality: best
homemade_options: null
uci_options:
Move Overhead: 100
Threads: 4
Hash: 2048
SyzygyPath: ./syzygy/
silence_stderr: false
uci_ponder: false
abort_time: 20
fake_think_time: false
rate_limiting_delay: 0
move_overhead: 2000
correspondence:
move_time: 5
checkin_period: 30
disconnect_time: 300
ponder: false
uci_ponder: false
challenge:
concurrency: 1
sort_by: best
accept_bot: false
only_bot: false
max_increment: 180
min_increment: 0
max_base: 315360000
min_base: 0
max_days: 14
min_days: 1
variants:
- standard
time_controls:
- bullet
- blitz
- rapid
modes:
- casual
- rated
block_list: []
greeting:
hello: Hi! I'm {me}. Good luck!
Type !help for a list of commands I
can respond
to.
goodbye: Good game!
hello_spectators: Hi! I'm {me}.
Type !help for a list of commands I
can respond
to.
goodbye_spectators: Thanks for
watching!
matchmaking:
allow_matchmaking: false
challenge_variant: random
challenge_timeout: 30
challenge_initial_time:
- 60
- 120
challenge_increment:
- 1
- 2
opponent_rating_difference: 100
opponent_allow_tos_violation: true
challenge_mode: random
delay_after_decline: none
block_list: []
challenge_days:
- null
opponent_min_rating: 600
opponent_max_rating: 4000
DEBUG ==================== config.py:161
DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
[02/01/23 01:27:00] DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/account HTTP/1.1" 200
None
INFO Welcome Iwantedtoplaychess! lichess-bot.py:730
INFO connected to lichess-bot.py:124
https://lichess.org/
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/account/playing
HTTP/1.1" 200 None
[02/01/23 01:27:01] DEBUG Event: {'type': 'gameStart', lichess-bot.py:267
'game': {'fullId':
'OCMs3SH8yrvS', 'gameId':
'OCMs3SH8', 'fen':
'rnbqkbnr/pppppppp/8/8/8/8/PPPPP
PPP/RNBQKBNR w KQkq - 0 1',
'color': 'white', 'lastMove':
'', 'source': 'ai', 'variant':
{'key': 'standard', 'name':
'Standard'}, 'speed': 'bullet',
'perf': 'bullet', 'rated':
False, 'hasMoved': False,
'opponent': {'id': None,
'username': 'Stockfish level 1',
'ai': 1}, 'isMyTurn': True,
'secondsLeft': 120, 'compat':
{'bot': True, 'board': False},
'id': 'OCMs3SH8'}}
INFO --- Process Used. Count: 1. IDs: lichess-bot.py:165
{'OCMs3SH8'}
[02/01/23 01:27:01] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
[02/01/23 01:27:02] INFO Backing off play_game(...) for 0.1s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 0.8s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:27:03] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 0.5s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:27:04] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 2.0s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:27:06] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 6.0s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:27:12] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
[02/01/23 01:27:13] DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 12.4s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:27:25] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 11.4s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:27:30] DEBUG Event: {'type': lichess-bot.py:267
'correspondence_ping'}
[02/01/23 01:27:37] DEBUG Starting new HTTPS connectionpool.py:1003
connection (1):
lichess.org:443
DEBUG https://lichess.org:443 "GET connectionpool.py:456
/api/bot/game/stream/OCMs3SH8
HTTP/1.1" 200 None
DEBUG Initial state: {'id': lichess-bot.py:430
'OCMs3SH8', 'variant': {'key':
'standard', 'name': 'Standard',
'short': 'Std'}, 'clock':
{'initial': 120000, 'increment':
0}, 'speed': 'bullet', 'perf':
{'name': 'Bullet'}, 'rated':
False, 'createdAt':
1675209496884, 'white': {'id':
'iwantedtoplaychess', 'name':
'Iwantedtoplaychess', 'title':
'BOT', 'rating': 2000,
'provisional': True}, 'black':
{'aiLevel': 1}, 'initialFen':
'startpos', 'type': 'gameFull',
'state': {'type': 'gameState',
'moves': '', 'wtime': 120000,
'btime': 120000, 'winc': 0,
'binc': 0, 'status': 'started'}}
DEBUG Starting engine: engine_wrapper.py:40
['./engines/stockfish']
DEBUG Using selector: EpollSelector selector_events.py:54
DEBUG Using PollingChildWatcher engine.py:170
INFO Backing off play_game(...) for 95.1s _common.py:105
(OSError: [Errno 8] Exec format
error: './engines/stockfish')
[02/01/23 01:28:00] DEBUG Event: {'type': lichess-bot.py:267
'correspondence_ping'}
MarkZH commented
What kind of file is ./engines/stockfish
? Is it the stockfish binary, a script file, or something else?
MarkZH commented
Also, can you run that stockfish executable by itself outside of lichess-bot?
MarkZH commented
If you are still having this issue and can provide more detail, please reopen this issue.