PyCharm does not highlight errors

Question:

I have a problem with PyCharm v2.7.
it does not show me errors.
I have configured it to show them as here
but nothing.
here a screenshot of what I see (no error displayed)
enter image description here

if I run code analysis it shows the errors marked as INVALID in the window but it does not highlight the code.
any idea?

Asked By: EsseTi

||

Answers:

I had the same issue with PyCharm Community Edition, v.2016.3.2. To fix,
go to Preferences... from the PyCharm menu, and open Editor/Colors & Fonts/General

Now go to Errors and Warnings/Error under your current schema.

I also had to set my Project Interpreter under Preferences/Project:<name>/Project Interpreter.

See screenshot.

enter image description here

Answered By: radtek

I found. i’ve enabled by chance the “power safe mode” that avoid error checking. it can be re-enabled by clicking on the little man on bottom right corner.

Answered By: EsseTi

I had this issue recently on PyCharm 2020.3.3 Community Edition.

What I’ve found is in the top right corner of the editor there is a Reader Mode button.
If you click it you turn the Reader Mode off and then you can see your errors.

enter image description here

You can re-enable it by clicking the book icon
Enter Reader Mode

Answered By: Jerzy Kiler

In my case, I had some ticks disabled in the Python Inspections menu in Settings > Editor > Inspections > Python. I have ticked everything and applied, and now it is working.

Settings > Editor > Inspections > Python

I don’t really understand why this happened as the problem arose from one day to another. I had even re-installed the whole PyCharm, trying older versions, and deleted the .pycharm configuration folder from home.

Answered By: josepdecid

None of the previous answers worked for me when I ran into this issue, but I was able to fix it by doing a hard reset on my PyCharm settings:

From the main menu, select File | Manage IDE Settings | Restore Default Settings.

You will lose all your custom settings this way of course, but this was the only thing that worked for me.

Answered By: Drew Pesall

I have tried many things, but only Invalidate Caches did the trick, after that I could hover the green arrow (top right side) and change Highlight to All Problemsenter image description here

Answered By: shlomiLan

I needed to "Add content root" under "Project Structure" in Preferences. I had no content root.

Answered By: user1689987

Nothing of this worked for me.

My problem was a single warning: "unreachable code" which blocked all errors from being highlighted.

I removed this line of code (+ the warning) and all errors showed up again.

Answered By: SaPropper

For me, this problem was a symptom of having created the file in the wrong place without realising. Before taking any drastic actions, check your project structure

Answered By: MatthewWestMK
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.