remi: [Bug - Regression problem ] Label Widget lost set_layout_orientation method. Worked fine in 2020.1.

This code previously worked:

                element.Widget = remi.gui.Label(element.DisplayText)
                element.Widget.set_layout_orientation(True)

but after a recent Remi upgrade it crashes with this error

Traceback (most recent call last):
  File "C:/Python/PycharmProjects/GooeyGUI/PySimpleGUIWeb.py", line 5121, in setup_remi_window
    PackFormIntoFrame(window, master_widget, window)
  File "C:/Python/PycharmProjects/GooeyGUI/PySimpleGUIWeb.py", line 4206, in PackFormIntoFrame
    element.Widget.set_layout_orientation(True)
AttributeError: 'Label' object has no attribute 'set_layout_orientation'

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17

Most upvoted comments

Looks like everything pretty much works. I checked where I’m using append and they are all containers. I don’t use set_layout_orientation anywhere at the moment, but may want to use it in the future depending on how I port over the “element justification” feature for Columns.

Thanks for the quick help!

image

The remi update is vast and different widgets were affected by changes. I suggest to:

  • use Container in place of Widget in PSG
  • search for append in PSG and verify it is used only for remi containers (Container, VBox, HBox, Svg, SvgGroup, ListView, DropDown, Table, TableRow, TableItem, TabBox, Dialogs, Menu, MenuBar, MenuItem, TreeView, TreeItem, )
  • search for set_layout_orientation in PSG and verify it only used for remi containers

If you point me to the latest PSG web version I can do these checks 😉

You don’t need to do anything with PySimpleGUIWeb code! I’ve got that handled. Just tell me what I need to do (which you have… remove the call).

I think I got the code from the Minesweeper game or some other Remi sample code. I’m sure I wouldn’t have come up with it myself. The Minesweeper game now also crashes with the append not working. I don’t know if that’s going to affect my code yet or not.

Thanks for the quick response! Nothing else needed at this time.