-
Notifications
You must be signed in to change notification settings - Fork 189
Crash: TypeError: a bytes-like object is required, not 'str' #569
Comments
What use case necessitates creating a docstring that is I can see a reason for creating a docstring that is a |
@cclauss there's no specific reason per se, but if I were to do that, I'd hope that pydocstyle won't crash while running on my code. |
My sense is that it is a good thing that bad input results in an exception being raised. |
+1 I agree with @cclauss. If it helps improve things, we might even want to catch that type error and add a helpful error message that points to the above link. Although I'm ambivalent on the latter. |
Having the program crash with a stack trace is bad for two reasons:
|
Their code is buggy. |
What I meant here was: When pydocstyle crashes, the user doesn't know if it's a bug in their code, or is it a bug in pydocstyle's code. Certainly, when I run a python program and it crashes I assume there's a bug in the program, and not the input I gave. |
Code snippet:
Output:
The text was updated successfully, but these errors were encountered: