The submission error when submit via cli

Hello. I had got the submission error when submit the exercise via cli,

exercism submit /home/odmin/snap/exercism/5/exercism/csharp/hello-world/HelloWorld.cs

Error is following as:
“Error: failed to parse API error response: invalid character ‘<’ looking for beginning of value”

If you know about this, please tell me what is error.
Thanks.

I don’t believe the snap image has been updated for several years. Exercism doesn’t reference it anymore at least. Did you first download the exercise through exercism download? My gut says perhaps your token is misconfigured. If you do exercism configure is there a < at the beginning or end of the token (don’t paste your token here)?

Yes. I had done as like Exercism.
And Token dont include the < character.

What does this command output?

exercism troubleshoot

Sorry for confuse.
Now happens other error.

  1. Please, please do not use images to share text.
  2. It looks like you’re running an old version of the CLI. Consider updating it.
  3. You may need to force download (which will delete your code, so save a copy). If you cd into the correct directory, you should be able to paste your code then run exercism submit without needing to specify filenames.
1 Like

The exercism tool requires, for submitting, the presence of the file ./.exercism/metadata.json under the current directory. You have to be in the exercise’s download directory to submit.

Version 3.0.13 was released in October 2019. There have been substantial changes to the server in the past 5 years, so I’m not surprised there are API errors.

I’d strongly recommend getting the exercism tool from Homebrew.

My recommendation is to download the correct executable directly and install it in “user space”. The updates happen restricted to the executable itself, and tends to go smoothly, without relying on a package manager.

Less moving parts, and less dependency on others.

1 Like

The guided walkthrough for installing the Exercism CLI on Linux only covers doing specifically that so I’d strongly encourage that as well.