napari / napari-animation

A napari plugin for making animations
https://napari.github.io/napari-animation/
Other
76 stars 27 forks source link

napari 0.4.8 issues #82

Closed alisterburt closed 3 years ago

alisterburt commented 3 years ago

Testing against 0.4.8rc3 and getting the following error - leaving this issue as a place to keep track of issues associated with the 0.4.8 release of napari


AttributeError                            Traceback (most recent call last)
/opt/homebrew/Caskroom/miniforge/base/envs/test/lib/python3.9/site-packages/napari/_qt/qt_main_window.py in _add_widget(key=('animation', 'Wizard'), hook_type='dock', *args=(False,))
    751                 def _add_widget(*args, key=key, hook_type=hook_type):
    752                     if hook_type == 'dock':
--> 753                         self.add_plugin_dock_widget(*key)
        global self.add_plugin_dock_widget = undefined
        key = ('animation', 'Wizard')
    754                     else:
    755                         self._add_plugin_function_widget(*key)

/opt/homebrew/Caskroom/miniforge/base/envs/test/lib/python3.9/site-packages/napari/_qt/qt_main_window.py in add_plugin_dock_widget(self=<napari._qt.qt_main_window.Window object>, plugin_name='animation', widget_name='Wizard')
    884
    885         # instantiate the widget
--> 886         wdg = Widget(**kwargs)
        wdg = undefined
        Widget = <class 'napari_animation._qt.animation_widget.AnimationWidget'>
        kwargs = {'viewer': Viewer(axes=Axes(visible=False, labels=True, colored=True, dashed=False, arrows=True), camera=Camera(center=(0.0, 0.0, 0.0), zoom=1.0, angles=(0.0, 0.0, 90.0), perspective=0.0, interactive=True), cursor=Cursor(position=(1.0, 1.0), scaled=True, size=1, style='standard'), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(enabled=False, stride=1, shape=(-1, -1)), layers=[], scale_bar=ScaleBar(visible=False, colored=False, ticks=True, position='bottom_right', font_size=10.0, unit=None), text_overlay=TextOverlay(visible=False, color=array([1., 1., 1., 1.]), font_size=10.0, position='top_left', text=''), help='', status='Ready', theme='dark', title='napari', mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x147fe6040>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Control-Shift-C': <bound method QtViewer.toggle_console_visibility of <napari._qt.qt_viewer.QtViewer object at 0x14dffe160>>, 'Alt-F': <bound method AnimationWidget._capture_keyframe_callback of <napari_animation._qt.animation_widget.AnimationWidget object at 0x174adfaf0>>, 'Alt-R': <bound method AnimationWidget._replace_keyframe_callback of <napari_animation._qt.animation_widget.AnimationWidget object at 0x174adfaf0>>, 'Alt-D': <bound method AnimationWidget._delete_keyframe_callback of <napari_animation._qt.animation_widget.AnimationWidget object at 0x174adfaf0>>, 'Alt-A': <bound method AnimationWidget._key_adv_frame of <napari_animation._qt.animation_widget.AnimationWidget object at 0x174adfaf0>>, 'Alt-B': <bound method AnimationWidget._key_back_frame of <napari_animation._qt.animation_widget.AnimationWidget object at 0x174adfaf0>>})}
    887
    888         # Add dock widget

/opt/homebrew/Caskroom/miniforge/base/envs/test/lib/python3.9/site-packages/napari_animation/_qt/animation_widget.py in __init__(self=<napari_animation._qt.animation_widget.AnimationWidget object>, viewer=Viewer(axes=Axes(visible=False, labels=True, col..._widget.AnimationWidget object at 0x174adfaf0>>}), parent=None)
     49
     50         # Update theme
---> 51         self._update_theme()
        self._update_theme = <bound method AnimationWidget._update_theme of <napari_animation._qt.animation_widget.AnimationWidget object at 0x174adfaf0>>
     52
     53     def _init_ui(self):

/opt/homebrew/Caskroom/miniforge/base/envs/test/lib/python3.9/site-packages/napari_animation/_qt/animation_widget.py in _update_theme(self=<napari_animation._qt.animation_widget.AnimationWidget object>, event=None)
    224         # get theme and raw stylesheet from napari viewer
    225         theme = get_theme(self.viewer.theme)
--> 226         raw_stylesheet = self.viewer.window.qt_viewer.raw_stylesheet
        raw_stylesheet = undefined
        self.viewer.window.qt_viewer.raw_stylesheet = undefined
    227
    228         # template and apply the primary stylesheet

AttributeError: 'QtViewer' object has no attribute 'raw_stylesheet'
sofroniewn commented 3 years ago

Ah yeah, we should fix and release!

Looks like there are a couple styling ones from the zulip too ...

alisterburt commented 3 years ago

yep - https://napari.zulipchat.com/#narrow/stream/215289-release/topic/0.2E4.2E8/near/238519700 for completeness

sofroniewn commented 3 years ago

Have both of these now been fixed by #83? Can we close this now and make a new release?

alisterburt commented 3 years ago

good to go yes! (happy to coordinate via zulip and do it myself (it should just be push with tag 0.0.2?) or if you're in a bit of a rush for you to just do it)

alisterburt commented 3 years ago

if the stretch is fixed in napari that is