小编Kil*_*eki的帖子

如何用pyrcc5编译resources.qrc文件

我正在尝试为 QGIS 3(我使用的是 Windows 10)制作一个插件,但在它显示此消息之前的一步创建之前:

"The resource compiler pyrcc5 was not found in your path. You'll have to manually compile the resources .qrc file with pyrcc5 before installing your plugin".
Run Code Online (Sandbox Code Playgroud)

这是一个挫折,因为在 pyqgis 中设置插件路径后,它会部署,但插件说它找不到类模块。

我已经设法制作了一个插件,但是在调用它的classFactory()方法时它说错误,因此我认为这是因为我未能编译 pyrcc5。

'remove_feature'由于调用其classFactory()方法时出错,选择它无法加载插件后会出现此错误:

ModuleNotFoundError: No module named 'remove_feature.resources' 
Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/Arnold Kilaini M/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\remove_feature\__init__.py", line 35, in classFactory
    from .Remove_feature import Remove_feature
  File "C:/PROGRA~1/QGIS3~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 672, in _import
    mod = …
Run Code Online (Sandbox Code Playgroud)

python plugins

6
推荐指数
1
解决办法
7651
查看次数

标签 统计

plugins ×1

python ×1