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

ERROR: unexpected error - are any errors expected by the user? #3718

Closed
skshetry opened this issue May 1, 2020 · 3 comments · Fixed by #3730
Closed

ERROR: unexpected error - are any errors expected by the user? #3718

skshetry opened this issue May 1, 2020 · 3 comments · Fixed by #3730
Labels
ui user interface / interaction

Comments

@skshetry
Copy link
Member

skshetry commented May 1, 2020

The following example is to drive my point home, but, yeah, the unexpected error is unnecessary.

$ cd  `mktemp -d`
$ mkdir .dvc
$ dvc status
ERROR: unexpected error - expected str, bytes or os.PathLike object, not NoneType

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
@skshetry skshetry added the ui user interface / interaction label May 1, 2020
@efiop
Copy link
Contributor

efiop commented May 1, 2020

@skshetry Yes, some errors are expected: like target that doesn't exist or something like that. But sometimes some random exceptions make its way all the way up without being caught/handled, so to us they are unexpected. Your example is for an issue that we should've handled nicer before it was caught by the top level except Exception and so it shouldn't be an unexpected error.

@skshetry
Copy link
Member Author

skshetry commented May 1, 2020

@efiop, I mean, ERROR is enough here. Adding unexpected error is not important at all.

@efiop
Copy link
Contributor

efiop commented May 1, 2020

@skshetry Some exceptions like AssertionError will not have any str at all :) So it would show up as ERROR: without anything else 🙂 So unexpected error is somewhat useful. But ideally dvc should handle everything before it hits the unexpected error, that's our last line of defense 🙂

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

Successfully merging a pull request may close this issue.

2 participants