Coder Social home page Coder Social logo

Comments (5)

hanjinliu avatar hanjinliu commented on June 18, 2024

Hi, @pr4deepr

Thank you for pointing this out, I totally forgot running tests in pure environments...
pyqtgraph is an optional dependency. The NameError is due to an upstream ImportError.

I think that is fixed in the last commit. Sorry.

from magic-class.

pr4deepr avatar pr4deepr commented on June 18, 2024

Thanks for that. I'm getting another error now:


========================= Errors for plugin 'llsz_napari' =========================

napari version: 0.4.12


ERROR #1: Error while importing module llsz -------------------------------------

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~\.conda\envs\llsz_napari\lib\site-packages\napari_plugin_engine\manager.py in _load_and_register(self=, mod_name='llsz', plugin_name='llsz_napari')
    317         try:
--> 318             module = load(mod_name)
        module = undefined
        global load = 
        mod_name = 'llsz'
    319             if self.is_registered(module):

~\.conda\envs\llsz_napari\lib\site-packages\napari_plugin_engine\manager.py in load(value='llsz')
   1041         raise ValueError(f"malformed entry point string: {value}")
-> 1042     module = importlib.import_module(match.group('module'))
        module = undefined
        global importlib.import_module = 
        match.group = 
   1043     attrs = filter(None, (match.group('attr') or '').split('.'))

~\.conda\envs\llsz_napari\lib\importlib\__init__.py in import_module(name='llsz', package=None)
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
        global _bootstrap._gcd_import = 
        name = 'llsz'
        level = 0
        package = None
    128 

~\.conda\envs\llsz_napari\lib\importlib\_bootstrap.py in _gcd_import(name='llsz', package=None, level=0)

~\.conda\envs\llsz_napari\lib\importlib\_bootstrap.py in _find_and_load(name='llsz', import_=)

~\.conda\envs\llsz_napari\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name='llsz', import_=)

~\.conda\envs\llsz_napari\lib\importlib\_bootstrap.py in _load_unlocked(spec=ModuleSpec(name='llsz', loader=

~\.conda\envs\llsz_napari\lib\importlib\_bootstrap_external.py in exec_module(self=, module=)

~\.conda\envs\llsz_napari\lib\importlib\_bootstrap.py in _call_with_frames_removed(f=, *args=( at 0x000002786F9EF240, fil...z_repo\llsz_napari\src\llsz\__init__.py", line 2>, {'__builtins__': {'ArithmeticError': , 'AssertionError': , 'AttributeError': , 'BaseException': , 'BlockingIOError': , 'BrokenPipeError': , 'BufferError': , 'BytesWarning': , 'ChildProcessError': , 'ConnectionAbortedError': , ...}, '__cached__': r'd:\onedrive - wehi.edu.au\wehi_projects\lightshe...pari\src\llsz\__pycache__\__init__.cpython-38.pyc', '__doc__': None, '__file__': r'd:\onedrive - wehi.edu.au\wehi_projects\lightsheet\llsz_repo\llsz_napari\src\llsz\__init__.py', '__loader__': , '__name__': 'llsz', '__package__': 'llsz', '__path__': [r'd:\onedrive - wehi.edu.au\wehi_projects\lightsheet\llsz_repo\llsz_napari\src\llsz'], '__spec__': ModuleSpec(name='llsz', loader=

d:\onedrive - wehi.edu.au\wehi_projects\lightsheet\llsz_repo\llsz_napari\src\llsz\__init__.py in 
      6 #from ._writer import napari_get_writer, napari_write_image
----> 7 from llsz.ui import napari_experimental_provide_dock_widget
        global llsz.ui = undefined
        global napari_experimental_provide_dock_widget = undefined
      8 #from llsz.ui_widget_test import napari_experimental_provide_dock_widget

d:\onedrive - wehi.edu.au\wehi_projects\lightsheet\llsz_repo\llsz_napari\src\llsz\ui.py in 
      6 
----> 7 from magicclass.wrappers import set_design
        global magicclass.wrappers = undefined
        global set_design = undefined
      8 from magicgui import magicgui

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\__init__.py in 
      2 
----> 3 from .core import (
        global core = undefined
        global magicclass = undefined
        global magicmenu = undefined
        global magiccontext = undefined
        global magictoolbar = undefined
        global magicmethod = undefined
        global Parameters = undefined
        global Bound = undefined
        global build_help = undefined
      4     magicclass,

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\core.py in 
     12 
---> 13 from .gui.class_gui import (
        global gui.class_gui = undefined
        global ClassGuiBase = undefined
        global ClassGui = undefined
        global GroupBoxClassGui = undefined
        global MainWindowClassGui = undefined
        global SubWindowsClassGui = undefined
        global ScrollableClassGui = undefined
        global DraggableClassGui = undefined
        global ButtonClassGui = undefined
        global CollapsibleClassGui = undefined
        global HCollapsibleClassGui = undefined
        global SplitClassGui = undefined
        global TabbedClassGui = undefined
        global StackedClassGui = undefined
        global ToolBoxClassGui = undefined
        global ListClassGui = undefined
     14     ClassGuiBase,

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\gui\__init__.py in 
----> 1 from ._base import BaseGui, MagicTemplate, MagicMethod
        global _base = undefined
        global BaseGui = undefined
        global MagicTemplate = undefined
        global MagicMethod = undefined
      2 from .class_gui import ClassGui
      3 from .menu_gui import MenuGui, MenuGuiBase, ContextMenuGui

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\gui\_base.py in 
     22 from .keybinding import as_shortcut
---> 23 from .mgui_ext import AbstractAction, Action, FunctionGuiPlus, PushButtonPlus, _LabeledWidgetAction, mguiLike
        global mgui_ext = undefined
        global AbstractAction = undefined
        global Action = undefined
        global FunctionGuiPlus = undefined
        global PushButtonPlus = undefined
        global _LabeledWidgetAction = undefined
        global mguiLike = undefined
     24 from .utils import get_parameters, define_callback

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\gui\mgui_ext.py in 
     13 from matplotlib.colors import to_rgb
---> 14 from ..widgets import Separator
        global widgets = undefined
        global Separator = undefined
     15 

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\widgets\__init__.py in 
     29 from .qtconsole import *
---> 30 from .qtgraph import *
        global qtgraph = undefined
     31 from .napari import *

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\widgets\qtgraph\__init__.py in 
      1 try:
----> 2     from .widgets import (
        global widgets = undefined
        global QtPlotCanvas = undefined
        global QtMultiPlotCanvas = undefined
        global Qt2YPlotCanvas = undefined
        global QtImageCanvas = undefined
        global QtMultiImageCanvas = undefined
      3         QtPlotCanvas,

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\widgets\qtgraph\widgets.py in 
      7 from ._utils import convert_color_code, to_rgba
----> 8 from .components import Legend, Region, ScaleBar, TextItem
        global components = undefined
        global Legend = undefined
        global Region = undefined
        global ScaleBar = undefined
        global TextItem = undefined
      9 from .graph_items import BarPlot, Curve, FillBetween, InfLine, LayerItem, Scatter, Histogram, TextGroup

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\widgets\qtgraph\components.py in 
     29 
---> 30 class Region(GraphicComponent):
        global Region = undefined
        global GraphicComponent = 
     31     """A linear region with magicgui-like API"""

~\.conda\envs\llsz_napari\lib\site-packages\magicclass\widgets\qtgraph\components.py in Region()
     31     """A linear region with magicgui-like API"""
---> 32     changed = Signal(tuple[float, float])
        global changed = undefined
        global Signal = 
        global tuple = undefined
        global float = undefined
     33 

TypeError: 'type' object is not subscriptable

The above exception was the direct cause of the following exception:

PluginImportError                         Traceback (most recent call last)
~\.conda\envs\llsz_napari\lib\site-packages\napari_plugin_engine\manager.py in discover(self=, path=None, entry_point=None, prefix=None, ignore_errors=True)
    262 
    263             try:
--> 264                 if self._load_and_register(mod_name, name):
        self._load_and_register = >
        mod_name = 'llsz'
        name = 'llsz_napari'
    265                     count += 1
    266                     self._id_counts[name] = 1

~\.conda\envs\llsz_napari\lib\site-packages\napari_plugin_engine\manager.py in _load_and_register(self=, mod_name='llsz', plugin_name='llsz_napari')
    320                 return None
    321         except Exception as exc:
--> 322             raise PluginImportError(
        global PluginImportError = 
        plugin_name = 'llsz_napari'
        global cause = undefined
        exc = undefined
    323                 f'Error while importing module {mod_name}',
    324                 plugin_name=plugin_name,

PluginImportError: Error while importing module llsz
================================================================================

from magic-class.

hanjinliu avatar hanjinliu commented on June 18, 2024

Did you installed pyqtgraph to solve the first error?
The second error could be caused by Python<3.9 with pyqtgraph installed, which cannot be tested with current setting...

from magic-class.

hanjinliu avatar hanjinliu commented on June 18, 2024

Anyway, apparently I should move those extension things to another submodule.
Does the current one work?

from magic-class.

pr4deepr avatar pr4deepr commented on June 18, 2024

Hi @hanjinliu
Thanks for this. I had a few dependency issues, so I just removed everything and created a new environment using the latest magic class version. It is working now..
Thanks for your help!

Cheers
Pradeep

from magic-class.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.