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

Using virtual layer gives error in GDAL processing algorithms #59364

Open
1 of 2 tasks
NyakudyaA opened this issue Nov 7, 2024 · 0 comments · May be fixed by #59465
Open
1 of 2 tasks

Using virtual layer gives error in GDAL processing algorithms #59364

NyakudyaA opened this issue Nov 7, 2024 · 0 comments · May be fixed by #59465
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@NyakudyaA
Copy link
Contributor

What is the bug or the crash?

Screenshot 2024-11-07 at 10 32 15

Steps to reproduce the issue

  • Load the world map
  • Create a virtual layer using something like:
select fid, "NAME", transform(geometry,'EPSG:4326','EPSG:3857') geom from map where "NAME" in ('Zimbabwe','South Africa','Zambia','Malawi')
  • Run the buffer algorithm from gdal
  • see the error above

Versions

QGIS 3.40 Mac

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

Looking at the error message it seems the problem can be fixed by changing https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/gdal/GdalUtils.py#L526-L529 to

from urllib.parse import unquote
elif 'layername' in uri:
      regex = re.compile(r'(?<=layername=)[^:|&]+')
      r = regex.search(unquote(uri))
      return r.groups(0)
@NyakudyaA NyakudyaA added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Nov 7, 2024
@agiudiceandrea agiudiceandrea added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Nov 7, 2024
@NyakudyaA NyakudyaA linked a pull request Nov 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants