Hello i cannot import your module into napari.
My napari is installed via conda.
======================== Errors for plugin 'napari-yolov5' ========================
napari version: 0.4.16
ERROR #1: Error while importing module napari_yolov5 ----------------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:318, in PluginManager._load_and_register(self=<napari.plugins._plugin_manager.NapariPluginManager object>, mod_name='napari_yolov5', plugin_name='napari-yolov5')
317 try:
--> 318 module = load(mod_name)
mod_name = 'napari_yolov5'
319 if self.is_registered(module):
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:1042, in load(value='napari_yolov5')
1041 raise ValueError(f"malformed entry point string: {value}")
-> 1042 module = importlib.import_module(match.group('module'))
match = <re.Match object; span=(0, 13), match='napari_yolov5'>
1043 attrs = filter(None, (match.group('attr') or '').split('.'))
File ~\anaconda3\envs\napari-env\lib\importlib\__init__.py:127, in import_module(name='napari_yolov5', package=None)
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
level = 0
name = 'napari_yolov5'
name[level:] = 'napari_yolov5'
package = None
_bootstrap = <module 'importlib._bootstrap' (frozen)>
File <frozen importlib._bootstrap>:1030, in _gcd_import(name='napari_yolov5', package=None, level=0)
File <frozen importlib._bootstrap>:1007, in _find_and_load(name='napari_yolov5', import_=<function _gcd_import>)
File <frozen importlib._bootstrap>:986, in _find_and_load_unlocked(name='napari_yolov5', import_=<function _gcd_import>)
File <frozen importlib._bootstrap>:680, in _load_unlocked(spec=ModuleSpec(name='napari_yolov5', loader=<_frozen...\napari-env\\lib\\site-packages\\napari_yolov5']))
File <frozen importlib._bootstrap_external>:850, in exec_module(self=<_frozen_importlib_external.SourceFileLoader object>, module=<module 'napari_yolov5' from 'C:\\Users\\fm\\ana...\lib\\site-packages\\napari_yolov5\\__init__.py'>)
File <frozen importlib._bootstrap>:228, in _call_with_frames_removed(f=<built-in function exec>, *args=(<code object <module> at 0x00000213AC97C870, fil...site-packages\napari_yolov5\__init__.py", line 2>, {'__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, ...}, '__cached__': r'C:\Users\fm\anaconda3\envs\napari-env\lib\site-p...napari_yolov5\__pycache__\__init__.cpython-39.pyc', '__doc__': None, '__file__': r'C:\Users\fm\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5\__init__.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'napari_yolov5', '__package__': 'napari_yolov5', '__path__': [r'C:\Users\fm\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5'], '__spec__': ModuleSpec(name='napari_yolov5', loader=<_frozen...\napari-env\\lib\\site-packages\\napari_yolov5']), '__version__': '0.0.1'}), **kwds={})
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5\__init__.py:7
2 __version__ = "0.0.1"
----> 7 from ._dock_widget import napari_experimental_provide_dock_widget
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5\_dock_widget.py:21
20 from magicgui import widgets as mw
---> 21 from magicgui.events import Event
22 from magicgui.application import use_app
ModuleNotFoundError: No module named 'magicgui.events'
The above exception was the direct cause of the following exception:
PluginImportError Traceback (most recent call last)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:264, in PluginManager.discover(self=<napari.plugins._plugin_manager.NapariPluginManager object>, path=None, entry_point=None, prefix=None, ignore_errors=True)
261 continue
263 try:
--> 264 if self._load_and_register(mod_name, name):
name = 'napari-yolov5'
mod_name = 'napari_yolov5'
self = <napari.plugins._plugin_manager.NapariPluginManager object at 0x00000213B46CAA90>
265 count += 1
266 self._id_counts[name] = 1
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:322, in PluginManager._load_and_register(self=<napari.plugins._plugin_manager.NapariPluginManager object>, mod_name='napari_yolov5', plugin_name='napari-yolov5')
320 return None
321 except Exception as exc:
--> 322 raise PluginImportError(
plugin_name = 'napari-yolov5'
323 f'Error while importing module {mod_name}',
324 plugin_name=plugin_name,
325 cause=exc,
326 )
327 if not (inspect.isclass(module) or inspect.ismodule(module)):
328 raise PluginRegistrationError(
329 f'Plugin "{plugin_name}" declared entry_point "{mod_name}"'
330 ' which is neither a module nor a class.',
331 plugin=module,
332 plugin_name=plugin_name,
333 )
PluginImportError: Error while importing module napari_yolov5
ERROR #2: Error while importing module napari_yolov5 ----------------------------
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:318, in PluginManager._load_and_register(self=<napari.plugins._plugin_manager.NapariPluginManager object>, mod_name='napari_yolov5', plugin_name='napari-yolov5')
317 try:
--> 318 module = load(mod_name)
mod_name = 'napari_yolov5'
319 if self.is_registered(module):
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:1042, in load(value='napari_yolov5')
1041 raise ValueError(f"malformed entry point string: {value}")
-> 1042 module = importlib.import_module(match.group('module'))
match = <re.Match object; span=(0, 13), match='napari_yolov5'>
1043 attrs = filter(None, (match.group('attr') or '').split('.'))
File ~\anaconda3\envs\napari-env\lib\importlib\__init__.py:127, in import_module(name='napari_yolov5', package=None)
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
level = 0
name = 'napari_yolov5'
name[level:] = 'napari_yolov5'
package = None
_bootstrap = <module 'importlib._bootstrap' (frozen)>
File <frozen importlib._bootstrap>:1030, in _gcd_import(name='napari_yolov5', package=None, level=0)
File <frozen importlib._bootstrap>:1007, in _find_and_load(name='napari_yolov5', import_=<function _gcd_import>)
File <frozen importlib._bootstrap>:986, in _find_and_load_unlocked(name='napari_yolov5', import_=<function _gcd_import>)
File <frozen importlib._bootstrap>:680, in _load_unlocked(spec=ModuleSpec(name='napari_yolov5', loader=<_frozen...\napari-env\\lib\\site-packages\\napari_yolov5']))
File <frozen importlib._bootstrap_external>:850, in exec_module(self=<_frozen_importlib_external.SourceFileLoader object>, module=<module 'napari_yolov5' from 'C:\\Users\\fm\\ana...\lib\\site-packages\\napari_yolov5\\__init__.py'>)
File <frozen importlib._bootstrap>:228, in _call_with_frames_removed(f=<built-in function exec>, *args=(<code object <module> at 0x00000213BF458D40, fil...site-packages\napari_yolov5\__init__.py", line 2>, {'__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAbortedError'>, ...}, '__cached__': r'C:\Users\fm\anaconda3\envs\napari-env\lib\site-p...napari_yolov5\__pycache__\__init__.cpython-39.pyc', '__doc__': None, '__file__': r'C:\Users\fm\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5\__init__.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'napari_yolov5', '__package__': 'napari_yolov5', '__path__': [r'C:\Users\fm\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5'], '__spec__': ModuleSpec(name='napari_yolov5', loader=<_frozen...\napari-env\\lib\\site-packages\\napari_yolov5']), '__version__': '0.0.1'}), **kwds={})
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5\__init__.py:7
2 __version__ = "0.0.1"
----> 7 from ._dock_widget import napari_experimental_provide_dock_widget
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_yolov5\_dock_widget.py:21
20 from magicgui import widgets as mw
---> 21 from magicgui.events import Event
22 from magicgui.application import use_app
ModuleNotFoundError: No module named 'magicgui.events'
The above exception was the direct cause of the following exception:
PluginImportError Traceback (most recent call last)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:264, in PluginManager.discover(self=<napari.plugins._plugin_manager.NapariPluginManager object>, path=None, entry_point=None, prefix=None, ignore_errors=True)
261 continue
263 try:
--> 264 if self._load_and_register(mod_name, name):
name = 'napari-yolov5'
mod_name = 'napari_yolov5'
self = <napari.plugins._plugin_manager.NapariPluginManager object at 0x00000213B46CAA90>
265 count += 1
266 self._id_counts[name] = 1
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_plugin_engine\manager.py:322, in PluginManager._load_and_register(self=<napari.plugins._plugin_manager.NapariPluginManager object>, mod_name='napari_yolov5', plugin_name='napari-yolov5')
320 return None
321 except Exception as exc:
--> 322 raise PluginImportError(
plugin_name = 'napari-yolov5'
323 f'Error while importing module {mod_name}',
324 plugin_name=plugin_name,
325 cause=exc,
326 )
327 if not (inspect.isclass(module) or inspect.ismodule(module)):
328 raise PluginRegistrationError(
329 f'Plugin "{plugin_name}" declared entry_point "{mod_name}"'
330 ' which is neither a module nor a class.',
331 plugin=module,
332 plugin_name=plugin_name,
333 )
PluginImportError: Error while importing module napari_yolov5
================================================================================
`