question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Layout" parameter doesn't work anymore in recent dev version

See original GitHub issue

Describe the bug Hi Talley @tlambert03 ,

this is related to our quick try of the recent master branch as discussed in #53 , the magicgui layout='vertical' parameter doesn’t work anymore. If this is intentional, no big deal. I can work in the meantime. I just switched back to the former released version.

To Reproduce

Expected behavior It should not bring an error in the following line

@magicgui(auto_call=True, layout='vertical')
def filter(input1: Image, operation: Filter = Filter.please_select, x: float = 1, y: float = 1, z: float = 0):

However, it crashes with this error:

C:\Users\rober\miniconda3\python.exe C:/structure/code/pyclesperanto_prototype/demo/napari_gui/particle_analyser.py
Traceback (most recent call last):
  File "C:/structure/code/pyclesperanto_prototype/demo/napari_gui/particle_analyser.py", line 65, in <module>
    def filter(input1: Image, operation: Filter = Filter.please_select, x: float = 1, y: float = 1, z: float = 0):
  File "c:\structure\code\magicgui\magicgui\function_gui.py", line 280, in inner_func
    func_gui = FunctionGui(
  File "c:\structure\code\magicgui\magicgui\function_gui.py", line 75, in __init__
    sig = magic_signature(function, gui_options=param_options)
  File "c:\structure\code\magicgui\magicgui\signature.py", line 269, in magic_signature
    raise ValueError(
ValueError: keyword arguments (gui_options) MUST match parameters in the decorated function.
Got extra keys: {'layout'}

Environment (please complete the following information):

  • OS: Windows
  • magicgui version 0.1.7-dev7
  • napari 0.4.3-dev2
  • PtQt5 5.15.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
tlambert03commented, Dec 16, 2020

TypeError: “widget” must be a QWidget or a sequence of QWidgets

actually… that error suggests that you don’t have https://github.com/napari/napari/pull/1994

sorry about all this 😂 I wouldn’t blame you if you wanted to wait a tiny bit for these new versions to actually be released

1reaction
tlambert03commented, Dec 29, 2020

just a heads up @haesleinhuepf, for container widgets (And for the magicgui decorator itself), this has returned to “layout=” rather than “orientation=” for release 0.2.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Messages | Maps JavaScript API - Google Developers
This page describes the error messages that can be returned by the Maps JavaScript API. The Maps JavaScript API writes error and warning...
Read more >
WindowManager.LayoutParams - Android Developers
Window flag : a special mode where the layout parameters are used to perform scaling of the surface when it is composited to...
Read more >
V6: Optional parameters · Issue #7285 · remix-run/react-router
I tried adding a trailing ? to a route using the v6 router, but it didn't seem to work. <Route path='/page/:friendlyName/:sort?' element={<Page/> ...
Read more >
Visual Studio: The Operation could not be completed. The ...
Building without an issue, however all of a sudden I have started to get the following error when building: The Operation could not...
Read more >
Troubleshoot CI-CD, Azure DevOps, and GitHub issues
Since the parameter is not in the ARM template anymore, we have to update the overridden parameters in the DevOps pipeline.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found