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

"failure of some kind" error message could be more helpful #69

Open
terrycojones opened this issue Apr 1, 2023 · 5 comments
Open

"failure of some kind" error message could be more helpful #69

terrycojones opened this issue Apr 1, 2023 · 5 comments

Comments

@terrycojones
Copy link

Hi. I just tried installing this package - and thanks for writing / releasing / maintaining it! I get errors when I visit a Python file:

mypy:Checker indicated failure of some kind
mypy:usage: mypy [-h] [-v] [-V] [more options; see below]
mypy:            [-m MODULE] [-p PACKAGE] [-c PROGRAM_TEXT] [files ...]
mypy:mypy: error: Mypy no longer supports checking Python 2 code. Consider pinning to mypy<0.980 if you need to check Python 2 code.

flake8:Checker indicated failure of some kind

But there is no indication of what the errors are so I don't know what to do next, other than look at the flycheck-pycheckers elisp and see if I can find and output the error message. But it feels like I shouldn't need to be doing that and that I am somehow doing something wrong...

Thanks for any help.

@msherry
Copy link
Owner

msherry commented Apr 1, 2023

Hi there, and thanks for submitting an issue!

The error output from the checker is included in this message. In this case mypy outputs a (not helpful) usage message, and then the actual error is:

error: Mypy no longer supports checking Python 2 code. Consider pinning to mypy<0.980 if you need to check Python 2 code.

Is this what you were looking for, or would you prefer to see something else here?

@terrycojones
Copy link
Author

Hi, thanks for the reply. I should have been more specific: the flake8 error has no information :-)

@terrycojones
Copy link
Author

Maybe flake8 is just exiting non-zero for some reason, without writing to stdout/stderr?

@msherry
Copy link
Owner

msherry commented Apr 2, 2023

Got it, thanks for clarifying! Yes, so we try to print out whatever context around the failure we have (as in the mypy failure in your example). It looks like flake8 isn't giving any output -- maybe if you run flycheck-compile (C-c ! C-c by default, I believe) on this file we can get more input to see what we might improve?

@snogge
Copy link

snogge commented Oct 10, 2023

You can always run the checker with M-x flycheck-compile and see the raw output from flycheck-pycheckers.py

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

3 participants