Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit command fails with "Error parsing API response" #23

Closed
toolness opened this issue Oct 20, 2013 · 20 comments
Closed

Submit command fails with "Error parsing API response" #23

toolness opened this issue Oct 20, 2013 · 20 comments

Comments

@toolness
Copy link

For context, I submitted my first two iterations via an OS X machine.

I was then at a different computer--an Ubuntu server VM running under Win7--and configured exercism on the VM. I "checked out" (is that the right word for it?) the same test exercise, copied and pasted my latest iteration into bob.rb and made some changes, successfully completed exercism login, and then tried resubmitting with exercism submit bob.rb, which produced the following result:

There was an issue with your submission: Error parsing API response: [json: cannot unmarshal number into Go value of type string]

However, it does seem like the actual third iteration made it onto the website here.

@kytrinyx
Copy link
Member

It seems like the submission succeeded, but that the go client was unable to parse the response correctly.

My guess is that this is because yesterday the submission.id changed from a string to a number. I'm updating the API to return the key which is used in the submissions URL rather than the actual id, since that is the value that interests us in the first place.

kytrinyx added a commit to exercism/exercism that referenced this issue Oct 20, 2013
@kytrinyx
Copy link
Member

I'm deploying now. Would you let me know after your next submission if it worked?

@toolness
Copy link
Author

Sure, will do! Thanks for looking into it.

@kytrinyx
Copy link
Member

kytrinyx commented Nov 9, 2013

@toolness Is this still a problem?

@toolness
Copy link
Author

Hey, sorry for the delay in responding... I just submitted an exercise successfully, but I was using the same exercism client executable as I did a month ago when I first submitted this issue. Was I supposed to update it?

@kytrinyx
Copy link
Member

The fix in the API should have taken care of it without needing to update the client. That said, there have been a bunch of bugfixes and things done on the CLI, so an update would probably be a good idea.

@kytrinyx
Copy link
Member

I'm closing this, but as always feel free to re-open it if you have further trouble!

@estomagordo
Copy link

I'm having this problem also. I try to submit a C# exercise (leap) but must be doing something wrong.

As the test file expects there to be a Year.IsLeap function, I have a class called Year.cs that passes the tests (provided the test file uses the same namespace as Year.cs - but how else would I get this to work?)

Anyway, I log on and try submit Year.cs (from various directories) and only get:

(Date and time) errpr åarsomg AÅO response - invalid character '<' looking for beginning of value.

@kytrinyx
Copy link
Member

I've got a separate discussion going where it seems like there are quite a few people experiencing errors with submission:

exercism/exercism#1747

This should be working, and it looks like the api is blowing up and returning HTML instead of JSON. I need to dig into this when I get home from work to figure out exactly what is going on.

@estomagordo
Copy link

Wow, you're fast :)

Any idea if I might get it to work from another computer and in another language?

@kytrinyx
Copy link
Member

It might. Sorry it's taking time to get back to you -- I'm so swamped with support requests at the moment that I haven't had a chance to dig into this yet.

@kytrinyx kytrinyx added the bug label Sep 24, 2014
@kytrinyx kytrinyx reopened this Sep 24, 2014
@kytrinyx
Copy link
Member

@estomagordo - this got lost in the fray, and I'm only just now getting back to looking through all of the issues. Are you still having problems submitting?

@kytrinyx
Copy link
Member

Closing due to inactivity. If you are still experiencing this issue, please reopen this with more information. Thanks!

@flayisflay
Copy link

I'm getting hit with this as well. Any fetch in any lang yields:
API response - json: cannot unmarshal string into Go value of type []api.SubmissionInfo

Installed via AUR package

@kytrinyx
Copy link
Member

@flayisflay -- what does exercism debug say?

@kytrinyx
Copy link
Member

Oh, the AUR package. I don't have access to that, and it's wildly out of date. Let me update the docs to remove that.

The easiest thing is to grab the most recent binary: https://github.com/exercism/cli/releases and stick it in your path.

@flayisflay
Copy link

Looks like it was because I hadn't configured the API key yet. I grabbed the github package before the AUR one, actually.

I just had to dig around in the tutorial for the answer.

Thanks for the quick reply.

@kytrinyx
Copy link
Member

I thought we had a better error message if you weren't configured. We should double check that.

Glad you got it solved.

@Wuppert
Copy link

Wuppert commented May 15, 2017

Hi
Im afraid I have the same error API response.
After exercism fetch java

@Tonkpils
Copy link
Contributor

@Wuppert please open up a new Issue with the specifics of your problem and the output of exercism debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants