ConservationInternational / trends.earth

trends.earth - measure land change
http://trends.earth
GNU General Public License v2.0
111 stars 45 forks source link

Error loading DlgTimeSeries.ui #688

Closed azvoleff closed 2 years ago

azvoleff commented 2 years ago

From @andersan in https://github.com/ConservationInternational/trends.earth/issues/318#issuecomment-1247254088:

This issue is happening for me with version 2.0 of the plugin. I am trying to install it via the plugin manager in QGIS (v. 3.26.0)

Running in Ubuntu 20.04.

I can try installing from ZIP later but wanted to make it clear that there is still an issue in 2.0.

Couldn't load plugin 'LDMP' due to an error when calling its classFactory() method

FileNotFoundError: [Errno 2] No such file or directory: '/home/chris/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LDMP/gui/DlgTimeSeries.ui'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/chris/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LDMP/init.py", line 91, in classFactory
from LDMP.plugin import LDMPPlugin # noqa: autoimport
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/chris/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LDMP/plugin.py", line 43, in
from .timeseries import show_time_series
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/chris/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LDMP/timeseries.py", line 35, in
Ui_DlgTimeseries, _ = uic.loadUiType(
File "/usr/lib/python3/dist-packages/qgis/PyQt/uic/init.py", line 36, in __loadUiType
return __PyQtLoadUiType(*args, **kwargs)
File "/usr/lib/python3/dist-packages/PyQt5/uic/init.py", line 199, in loadUiType
winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports,
File "/usr/lib/python3/dist-packages/PyQt5/uic/Compiler/compiler.py", line 111, in compileUi
w = self.parse(input_stream, resource_suffix)
File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py", line 1020, in parse
document = parse(filename)
File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 1202, in parse
tree.parse(source, parser)
File "/usr/lib/python3.8/xml/etree/ElementTree.py", line 584, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/home/chris/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LDMP/gui/DlgTimeSeries.ui'

Python version: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
QGIS version: 3.26.0-Buenos Aires Buenos Aires, 0aece2818e
azvoleff commented 2 years ago

@andersan - can you tell me if you have anything under /home/chris/.local/share/QGIS/QGIS3/profiles/default/python/plugins/LDMP/gui? Wondering if just that one ui file is missing or if the whole path is wrong for some reason

andersan commented 2 years ago

@azvoleff there is a folder there with ~25 files, including one called "DlgTimeseries.ui" with the s lowercase in Timeseries

azvoleff commented 2 years ago

Ah, ok. That is it then. I thought we'd fixed all those issues - apparently not. If you rename to match the case (so it is "DlgTimeSeries.ui", then you should be good to go. And will fix in the next release.

azvoleff commented 2 years ago

Actually - this is already fixed on the main branch - just not yet released to QGIS. So you could also install directly from the repo or the zipfile and that should do it. Just renaming may work, but using the latest development version is safest bet.

andersan commented 2 years ago

Changing the file name fixed it! Thank you

azvoleff commented 2 years ago

Closing as now fixed