lichess-cli icon indicating copy to clipboard operation
lichess-cli copied to clipboard

Vague error message: "Missing scope"

Open mtilda opened this issue 3 years ago • 1 comments

I am getting this vague error message when I try to play a move in a game. Any idea why?

$ lichess-cli g
┌──────────┬───────────┬──────────┬───────────┬─────────────────────────────┐
│ ID       │ TURN      │ OPPONENT │ LAST MOVE │ BOARD                       │
├──────────┼───────────┼──────────┼───────────┼─────────────────────────────┤
│ XXXXXXXX │ Your Turn │ Example  │           │  ♜  ♞  ♝  ♛  ♚  ♝  ♞  ♜  8  │
│          │           │          │           │  ♟  ♟  ♟  ♟  ♟  ♟  ♟  ♟  7  │
│          │           │          │           │                          6  │
│          │           │          │           │                          5  │
│          │           │          │           │                          4  │
│          │           │          │           │                          3  │
│          │           │          │           │  ♙  ♙  ♙  ♙  ♙  ♙  ♙  ♙  2  │
│          │           │          │           │  ♖  ♘  ♗  ♕  ♔  ♗  ♘  ♖  1  │
│          │           │          │           │  a  b  c  d  e  f  g  h     │
└──────────┴───────────┴──────────┴───────────┴─────────────────────────────┘

$ lichess-cli p XXXXXXXX e4  
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ ATTEMPTED MOVE ┃ MESSAGE       ┃
┣━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━┫
┃ e4             ┃ Missing scope ┃
┗━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┛

The same thing happens when I try starting an AI game:

$ lichess-cli nai 1 white
lichess-cli: error: Missing scope

mtilda avatar Jan 11 '23 15:01 mtilda

Hi @mtilda

The error message is vague. I think that should certainly be improved.

However you need to state which piece is moving and where to. For instance to move the pawn from e2 to e4 you must pass:

lichess-cli p XXXXXXXX e2e4

Let me know if that works.

mattcanty avatar Feb 22 '23 09:02 mattcanty