Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS version compatibility #32

Open
shyamamrith opened this issue Oct 6, 2023 · 0 comments
Open

QGIS version compatibility #32

shyamamrith opened this issue Oct 6, 2023 · 0 comments
Assignees
Labels
version Things related to compatibility with QGIS, Python, E+ versions

Comments

@shyamamrith
Copy link
Collaborator

shyamamrith commented Oct 6, 2023

The plugin has been tested on a number of QGIS versions, with some having issues with compatibility. However, the issues have been inconsistent and do not necessarily occur on all computers running the same version of QGIS which was once seen to encounter a problem. This needs further investigating, and also it could be useful to preempt places where failure may occur so that useful error messages can be raised.

Problem versions:

  • Apparently 3.10.3 LTR does not have pandas (not verified)
  • QGIS 3.22.8, 3.22.9 cannot import decorator
  • QGIS 3.22.10
    • Worked on my PC
    • Could not import pandas for some (unable to reproduce)

Tested versions:

  • QGIS 3.10.8 has python 3.7.0 and pandas 1.0.1, runs fine
  • QGIS 3.16 has python 3.7 and pandas 1.0.1, runs fine
    • 3.16.11 on Desktop@UCL Anywhere does not work: AttributeError: type object 'QgsVectorFileWriter' has no attribute 'writeAsVectorFormatV3'
    • Apparently this function was introduced in 3.20
  • QGIS 3.22.7 (my previous version)
  • QGIS 3.26.3 (used in Lima)
  • QGIS 3.22.14 LTR
    • Tested in Windows sandbox
    • Tested on 10MS Mac
    • Used in teaching with no problems
  • QGIS 3.26.1 Mac (Dom)

Update 06/01/2025

Pandas issue

Cannot install plugin in QGIS 3.34.13 Windows. Raises an error "TypeError: expected string or bytes-like object" when importing Pandas. The traceback to the cause:

Decorator issue

Updated to QGIS 3.34.14 Windows and the pandas error seems to disappear. Instead, it cannot import decorator due to the more straightforward "ModuleNotFoundError: No module named 'decorator'". The decorator package does not exist in site-packages directory. This was double-checked with a fresh install in Windows sandbox.

  • This can be circumvented by packaging decorator as has been done for eppy and munch.

Note about multiple QGIS versions

When multiple QGIS versions are installed, they seem to share common files including the Python site-packages folder (at least on Windows). It is possible that having an existing installation of QGIS before installing another could make it hard to tell which version has the issue.

Custom package versions

The included static packages eppy and munch need to be updated as the QGIS Python version increments to avoid errors. As it stands, the current included version of eppy causes an import error from collections. There would need to be some code that chooses which version to use depending on the overall Python version.

Note: can list available packages by typing help("modules") in the Python console.

@shyamamrith shyamamrith self-assigned this Oct 6, 2023
@shyamamrith shyamamrith added the version Things related to compatibility with QGIS, Python, E+ versions label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version Things related to compatibility with QGIS, Python, E+ versions
Projects
None yet
Development

No branches or pull requests

1 participant