Open peetw opened 3 years ago
I think the problem is related to the path space of QGIS xx. See this link .
The problem is that when you change it directly to double quotes, the Python statement in pb_tool treats it as single quotes.
Command '['C:\\PROGRA~1\\QGIS 3.10\\apps\\Python37\\Scripts\\pyrcc5.BAT', '-o', 'resources.py', 'resources.qrc']'
C:\Program Files\QGIS 3.10\apps\Python37\Scripts\pyrcc5.bat
@C:\\PROGRA~1\\QGIS 3.10\apps\Python37\python.exe -m PyQt5.pyrcc_main %*
@"C:\\PROGRA~1\\QGIS 3.10\apps\Python37\python.exe" -m PyQt5.pyrcc_main %*
On the other hand, it is giving me an error building the documentation:
Building the help documentation
"sphinx-build" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
@dortegat I'm not sure that is the issue here - I installed QGIS using OSGeo4W, which by default installs to C:\OSGeo4W64 and has no spaces in the path (see Command '['C:\\OSGEO4~1\\apps\\Python37\\Scripts\\pyrcc5.BAT', '-o', 'resources.py', 'resources.qrc']'
). Furthermore, running pb_tool compile
works correctly, it's just pb_tool deploy
that fails to compile.
@peetw In my case I installed QGIS version 3.10 standalone.
Compiling the resource file without pb_tool, the following code works correctly editing the file adding the double quotes (C:\Program Files\QGIS 3.10\apps\Python37\Scripts\pyrcc5.bat):
SET OSGEO4W_ROOT = C: \ Program Files \ QGIS 3.10
call "% OSGEO4W_ROOT%" \ bin \ o4w_env.bat
call qt5_env.bat
call py3_env.bat
pyrcc5 -o resources.py resources.qrc
If they are not added, it gives the following error:
"C:\\PROGRA~1\\QGIS" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
@dortegat Indeed, but that looks to be a separate issue to the one that I originally raised.
Also I have the following error building the documentation with Sphinx
Building the help documentation
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00003c68 (most recent call first):
After creating a new plugin on Windows,
pb_tool deploy
fails to compile theresources.qrc
file and thus fails to deploy the plugin. This can be fixed by runningpb_tool compile
(which does succeed) first.Steps to reproduce
Open a PyQGIS-enabled command prompt and run the following commands:
This will output the following:
System