-
Notifications
You must be signed in to change notification settings - Fork 47
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
"Layout" parameter doesn't work anymore in recent dev version #54
Comments
try I'll add a better deprecation warning and value pass-through |
huh, that's weird actually... and might be more indicative of an issue with napari's exception handling? can you send me the full script? |
I observed the bug with this long script. However, also with this short one, the is crash reproducible:
Without the magicgui annotation, it works:
|
import napari
from magicgui import magicgui
from napari.layers import Image
@magicgui(auto_call=True)
def process_image(input: Image, sigma: float = 5) -> Image:
if input:
return input
# start up napari
with napari.gui_qt():
viewer = napari.Viewer()
viewer.open('https://samples.fiji.sc/blobs.png', name='blobs')
# don't use Gui() anymore ... just pass the function directly
# gui = process_image.Gui()
viewer.window.add_dock_widget(process_image) |
lol... ok, will take a look later when I can run the script :) thanks! |
aha! figured it out. This is due to the fact that |
you know... I saw something very similar the other day, and i never got to the bottom of it. I can say it seems to have something to do with the examples folder (moving the napari examples out prevented it) and requires using the conda create -n testenv python=3.8
conda activate testenv
# install recent masters using pip
pip install \
git+git://github.com/napari/napari \
git+git://github.com/napari/magicgui \
pyqt5
python your_script.py will try to figure it out. |
actually... that error suggests that you don't have napari/napari#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 |
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 |
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
However, it crashes with this error:
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: