ImportError: cannot import name 'STARTF_USESHOWWINDOW' from 'subprocess'
Closed this issue · 4 comments
kannes commented
Crashes on Linux on initialisation:
Couldn't load plugin 'a00_qpip' due to an error when calling its classFactory() method
ImportError: cannot import name 'STARTF_USESHOWWINDOW' from 'subprocess' (/usr/lib/python3.11/subprocess.py)
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python/plugins/a00_qpip/__init__.py", line 2, in classFactory
from .plugin me Plugin
File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python/plugins/a00_qpip/plugin.py", line 14, in
from .ui import MainDialog
File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python/plugins/a00_qpip/ui.py", line 10, in
from .utils import Lib, icon
File "/usr/lib/python3.11/site-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python/plugins/a00_qpip/utils.py", line 4, in
from subprocess import (
ImportError: cannot import name 'STARTF_USESHOWWINDOW' from 'subprocess' (/usr/lib/python3.11/subprocess.py)
Python version: 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801]
QGIS version: 3.34.3-Prizren Prizren, exported
Python Path:
/usr/share/qgis/python
/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python
/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python311.zip
/usr/lib/python3.11
/usr/lib/python3.11/lib-dynload
/home/me/.local/lib/python3.11/site-packages
/usr/lib/python3.11/site-packages
/home/me/.local/share/QGIS/QGIS3/profiles/20240402/python
Plugin was installed via QGIS GUI: 0.0.1-beta.3 updated at 24.08.2022 12:59
It sounds like this is a Windows-only thing, I am on Linux.
kannes commented
Thanks!
kannes commented
I placed the a00_qpip
directory in a fresh profile's plugin directory:
- No issues activating/loading the plugin
- The plugin dialog opens
I'd say it passes with flying colors 🇨🇭