Basemap import error in PyCharm — KeyError: ‘PROJ_LIB’

For Windows 10 with Anaconda + Python 3.71 (and I’m sure other Python 3 versions and Windows 7/8), you can tell Basemap where Proj4’s “epsg” file is to succeed. I don’t have an “environment” or whatever because it’s too much work to figure out – so I didn’t have an anaconda\share\proj area (as far as … Read more

Why does PyCharm not accept my type hint for an empty list?

Looking at PEP 484, specifically the section on type comments (the precursor to variable annotations) this does indeed seem like a bug with PyCharm’s checker. Quoting from the PEP: In non-stub code, there is a similar special case: from typing import IO stream = None # type: IO[str] Type checkers should not complain about this … Read more

How do I get PyCharm to show entire error diffs from pytest?

If you look closely into PyCharm sources, from the whole pytest output, PyCharm uses a single line the to parse the data for displaying in the Click to see difference dialog. This is the AssertionError: <message> line: def test_spam(): > assert v1 == v2 E AssertionError: assert {‘foo’: ‘bar’} == {‘foo’: ‘baz’} E Differing items: … Read more

How can I run a shell script instead of python in a PyCharm run configuration?

If you want to see such a feature in PyCharm please vote on IDEA-112256 ‘Command Line’ Run Configuration feature request. Run/Debug Configurations section of Pycharm’s online help lists all supported types of Run/Debug configurations and there’s no support for shell scripts indeed. However, you might be able to add such support by installing a plugin. … Read more

PyCharm noinspection for whole file?

Is it possible to disable an inspection for the whole file in PyCharm? Yes. NOTE: This answer is for this quoted question only (and not about “Maybe there’s another way to fix these problems? Maybe I’m using py.test incorrectly?”). Settings/Preferences | Appearance & Behavior | Scopes Create a new scope that would include such “unwanted” … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)