-
Notifications
You must be signed in to change notification settings - Fork 6
[push] Validation of datapackage.json on data push is not clear #23
Comments
@pwalsh Thanks for reporting this! We have a separate command |
@Mikanebu I think you must already be validating on |
I'm running:
|
@pwalsh Yes, you are right, it validates |
@pwalsh thanks for the feedback! You're getting this error on reading Also, can I suggest to use our Desktop app so your CLI tool is always up to date - https://github.com/datahq/data-desktop/releases (it is available only for MacOS right now). |
@anuveyatsu I know about the desktop app, but personally, I prefer CLI tools and have average to poor experience with Electron apps (Slack etc. are resource hungry). So, for now at least, I really prefer to use the CLI from npm. As I pulled the CLI from npm in the last hour, I assume it is up-to-date? |
@pwalsh we've released a newer version today so I believe NPM is out of date. But I will publish right now so you can re-install. |
|
@AcckiyGerman I don't think I understand you. |
@zelima please forget this question, we already discussed it, here is the log: Dima German @AcckiyGerman 12:40 user@pc:~/work/datasets/gdp$ data push
> Error! Unexpected string in JSON at position 1225
user@pc:~/work/datasets/gdp$ data validate
> Error! Unexpected string in JSON at position 1225
> Error! Parse error on line 47:
...d OECD" } ] "title": "Country, R
--------------------^
Expecting 'EOF', '}', ',', ']', got 'STRING' so data push error is not obvious enough I think, data validate error is cool ) Meiran Zhiyenbayev @Mikanebu 12:39 Dima German @AcckiyGerman 12:40 user@pc:~/work/datasets/gdp$ data push
> Error! Unexpected string in JSON at position 1225
> You can run 'data validate' to get additional info ??? Anuar Ustayev @anuveyatsu 12:40 Meiran Zhiyenbayev @Mikanebu 12:40 Dima German @AcckiyGerman 12:41 |
FIXED:
|
Description
I have an invalid
datapackage.json
. I try to usedata push
.I get the message
> Error! Unexpected end of JSON input
.I happen to know as a developer that this error is raised from the method that validates the descriptor. Even without fixing the messages that get thrown by our use of JSON Schema validators on our descriptors, the user experience could be greatly improved by showing the user the context of this error.
Example:
Then I would at least know where the error comes from.
The text was updated successfully, but these errors were encountered: