Korto19 / Group_and_Sort_Layers

Plugin che raggruppa i layer per tipo e li ordina alfanumericamente
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

Empty project or Not a Group #6

Open amgiss opened 1 year ago

amgiss commented 1 year ago

Thanks for the very useful plugin.

I recently started getting an error with a particular project running Group Sort that returns " CRITICAL ERROR : Empty project or Not a Group".

If I copy the group layer to a new unsaved project the group sorting with the plugin works as expected.

I can get the script supplied in a previous issue to run and sort the Group Layer but have noticed that it will fail on Group Layers with spaces in the name whereas the Group Sort plugin doesn't have that problem.

Can I provide any further information for you?

Korto19 commented 1 year ago

Thanks for your interest and feedback Sure, maybe a sample project Sincerely

erydit commented 10 months ago

example.zip I confirm the bug. In this example project I cant sort layers in a group because of an error "Empty project or Not a Group"

QGIS | 3.32.3-Lima Group_and_Sort_Layers | 1.2

Korto19 commented 10 months ago

I apologize for the delay You must select the group before running the command

⁣Ottieni BlueMail per Android ​

Il giorno 30 ott 2023, 10:53, alle ore 10:53, erydit @.***> ha scritto:

example.zip I confirm the bug. In this example project I cant sort layers in a group because of an error "Empty project or Not a Group"

QGIS | 3.32.3-Lima Group_and_Sort_Layers | 1.2

-- Reply to this email directly or view it on GitHub: https://github.com/Korto19/Group_and_Sort_Layers/issues/6#issuecomment-1784838657 You are receiving this because you commented.

Message ID: @.***>

erydit commented 10 months ago

I apologize for the delay You must select the group before running the command ⁣Ottieni BlueMail per Android ​ Il giorno 30 ott 2023, 10:53, alle ore 10:53, erydit @.> ha scritto: example.zip I confirm the bug. In this example project I cant sort layers in a group because of an error "Empty project or Not a Group" QGIS | 3.32.3-Lima Group_and_Sort_Layers | 1.2 -- Reply to this email directly or view it on GitHub: #6 (comment) You are receiving this because you commented. Message ID: @.>

That is how I do, @Korto19 )

amgiss commented 10 months ago

That is how I am doing it also. If it makes any difference the Group Layer I am trying to sort contains tables only.

The Layers and Groups Sort works perfectly, I just can't run Group Sort Asc & Desc on a selected group layer - even on a group layer created by running the Layers and Group Sort.

erydit commented 10 months ago

@Korto19

Here is a video that shows what is happening:

https://github.com/Korto19/Group_and_Sort_Layers/assets/25078871/a5664de4-e886-423d-8cc3-9853693eb8c8

erydit commented 10 months ago

@Korto19 I just tried to figure it out. The error occurs here:

Traceback (most recent call last): File "/home/rstanislav/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Group_and_Sort_Layers/GroupAndSortLayer.py", line 341, in group_sort lyr_keys = OrderedDict(sorted(LyrInGroup(group.children()).items(), reverse = rev)).keys() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'str' object cannot be interpreted as an integer