In QGIS 3.4, after creating a plugin with plugin builder, compiling it with
pb_tools, I still can't load it to QGIS. I keep getting the following error message:
"Couldn't load plugin 'test_api' due to an error when calling its classFactory() method ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead."
I've already tried to search for the answer here but no success.
Here is how my
.bat file looks like
@ECHO OFF set OSGEO4W_ROOT=C:\OSGeo4W64 set PATH=%OSGEO4W_ROOT%\bin;%PATH% set PATH=%PATH%;%OSGEO4W_ROOT%\apps\qgis\bin set PATH=%PATH%;C:\Program Files\7-Zip @echo off call "%OSGEO4W_ROOT%\bin\o4w_env.bat" call "%OSGEO4W_ROOT%\bin\qt5_env.bat" call "%OSGEO4W_ROOT%\bin\py3_env.bat" @echo off path %OSGEO4W_ROOT%\apps\qgis-dev\bin;%OSGEO4W_ROOT%\apps\grass\grass-7.2.2\lib;%OSGEO4W_ROOT%\apps\grass\grass-7.2.2\bin;%PATH% cd /d %~dp0 ::start cmd
I guess the other setups are correct. What am I doing wrong?