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

Properly fix legend issue in develop. #2009

Merged
merged 3 commits into from
Sep 7, 2023
Merged

Properly fix legend issue in develop. #2009

merged 3 commits into from
Sep 7, 2023

Conversation

joernu76
Copy link
Member

@joernu76 joernu76 commented Sep 6, 2023

Was fixed in stable. Other improper fixes in develop prevent this from working; also a merge error.

Purpose of PR?:

Fixes #1928

@joernu76 joernu76 requested a review from ReimarBauer September 6, 2023 23:29
@@ -1478,24 +1478,21 @@ def append_multiple_images(self, imgs):
"""
images = [x for x in imgs if x]
if images:
if hasattr(self.view, 'fig') is False:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was needed before not to crash on a different attribute than 'fig'

https://geoportal2.duisburg.de/arcgisserver/services/Luftbilder/Historische_Luftbilder/MapServer/WMSServer

now it crashes on

Fatal error in MSS 8.3.0 on Linux-6.2.0-10018-tuxedo-x86_64-with-glibc2.35
Python 3.10.8 | packaged by conda-forge | (main, Nov 22 2022, 08:23:14) [GCC 10.4.0]

Please report bugs in MSS to https://github.com/Open-MSS/MSS

Information about the fatal error:

Traceback (most recent call last):
  File "/home/reimar/MAIN/MSS/mslib/msui/wms_control.py", line 1383, in continue_retrieve_image
    self.display_retrieved_image(img, legend_img, layer, style, init_time, valid_time, complete_level)
  File "/home/reimar/MAIN/MSS/mslib/msui/wms_control.py", line 1629, in display_retrieved_image
    self.view.draw_legend(self.append_multiple_images(legend_imgs))
  File "/home/reimar/MAIN/MSS/mslib/msui/wms_control.py", line 1484, in append_multiple_images
    max_height = int((self.view.plotter.fig.get_size_inches() * self.view.plotter.get_dpi())[1] * 0.99)
AttributeError: 'TopViewPlotter' object has no attribute 'get_dpi'

see also
#1803

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment, I don't know why it now "crashes" differently

@joernu76
Copy link
Member Author

joernu76 commented Sep 7, 2023

Because the actual fix was not properly merged from stable and I botched the manual reapplication. Works now.

@joernu76 joernu76 requested a review from ReimarBauer September 7, 2023 16:04
@joernu76 joernu76 linked an issue Sep 7, 2023 that may be closed by this pull request
@@ -1412,7 +1412,7 @@ def render_new_permission(self, op_id, u_id):
operation_desc = f'{operation["path"]} - {operation["access_level"]}'
widgetItem = QtWidgets.QListWidgetItem(operation_desc, parent=self.ui.listOperationsMSC)
widgetItem.op_id = operation["op_id"]
widgetItem.catgegory = operation["category"]
widgetItem.operation_category = operation["category"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and also in stable I wonder what it means that we don't have seen a failure popping up

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently, you can assign whatever you want as an attribute (yeah, duck-typing!)

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

@ReimarBauer ReimarBauer merged commit 6d8754c into develop Sep 7, 2023
@ReimarBauer ReimarBauer deleted the i1928c branch September 7, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

default wms server from config not accessible
2 participants