I'm trying to use to PyQGIS from PyCharm environment, and used those guides to try and install it: Guide 1 Guide 2

I don't have GRASS on my computer, so in guide 2 I deleted it.

Now, when I try to import the QGIS libraries it works and PyCharm complete alone the functions, but when I try to run my code I get this error:

Traceback (most recent call last):
  File "C:/Users/Adi Portal/PycharmProjects/War_Management_Project/qgis_test.py", line 30, in <module>
    from qgis.core import (
  File "C:\OSGeo4W64\apps\qgis\python\qgis\__init__.py", line 78, in <module>
    import qgis.gui
  File "C:\OSGeo4W64\apps\qgis\python\qgis\gui\__init__.py", line 25, in <module>
    from qgis._gui import *
ValueError: PyCapsule_GetPointer called with incorrect name

I've searched for solutions all over the internet but couldn't solve the problem. I'm using Python 3.7, PyCharm 2019.2.2, QGIS 3.8.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.