Skip to content

metrics show: error when type is specified but there is no xpath #1506

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

Closed
efiop opened this issue Jan 16, 2019 · 4 comments
Closed

metrics show: error when type is specified but there is no xpath #1506

efiop opened this issue Jan 16, 2019 · 4 comments
Labels

Comments

@efiop
Copy link
Contributor

efiop commented Jan 16, 2019

dvc run -M tmp.metric 'echo \{\"AUC\": \"0.65\"\} > tmp.metric'
dvc metrics show tmp.metric  # works well
dvc metrics modify tmp.metric --type json
dvc metrics show tmp.metric

Error: Unable to read metric in 'tmp.metric': 'NoneType' object is not subscriptable

Having any troubles? Hit us up at dvc.org/support, we are always happy to help!
Error: Failed to show metrics: File 'tmp.metric' does not exist

Having any troubles? Hit us up at dvc.org/support, we are always happy to help!

Also note double "Having any troubles" message.

@efiop efiop added bug Did we break something? help wanted good first issue labels Jan 16, 2019
@efiop
Copy link
Contributor Author

efiop commented Jan 16, 2019

The original bug was caused by incorrect command escaping, which resulted in trash being added to tmp.metric, causing jsonpath_rw module to error-out.

@efiop efiop closed this as completed Jan 16, 2019
@efiop efiop reopened this Jan 16, 2019
@efiop
Copy link
Contributor Author

efiop commented Jan 16, 2019

My bad, I forgot to run -t json. Can confirm this bug.

@ghost
Copy link

ghost commented Mar 26, 2019

I couldn't confirm this issue 🤔

@efiop
Copy link
Contributor Author

efiop commented Mar 27, 2019

Fixed by #1709

@efiop efiop closed this as completed Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant