haesleinhuepf / napari-script-editor

A python script editor plugin for napari
BSD 3-Clause "New" or "Revised" License
11 stars 0 forks source link

Bug with the script editor installation ? #9

Closed matfallet closed 2 years ago

matfallet commented 2 years ago

Dear support, I ma sorry, I should make somethig wrong but I have installed the script editor (same for napari-brighness-contrast) and I don't find it in napari, I did the following ;

in my napari env : pip install napari-script-editor (no error) I launch napari typing napari when I go in the tools menu (nothing about the script editor) Si In the Plugins/plugin errors :

===================== Errors for plugin 'napari-script-editor' =====================

napari version: 0.4.15

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


ValueError Traceback (most recent call last) File ~\anaconda3\envs\napari_imaris\lib\site-packages\napari_plugin_engine\manager.py:318, in PluginManager._load_and_register(self=, mod_name='napari_script_editor', plugin_name='napari-script-editor') 317 try: --> 318 module = load(mod_name) mod_name = 'napari_script_editor' 319 if self.is_registered(module):

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

File ~\anaconda3\envs\napari_imaris\lib\importlib__init__.py:127, in import_module(name='napari_script_editor', package=None) 126 level += 1 --> 127 return _bootstrap._gcd_import(name[level:], package, level) level = 0 name = 'napari_script_editor' name[level:] = 'napari_script_editor' package = None _bootstrap =

File :1014, in _gcd_import(name='napari_script_editor', package=None, level=0)

File :991, in _find_and_load(name='napari_scripteditor', import=)

File :975, in _find_and_load_unlocked(name='napari_scripteditor', import=)

File :671, in _load_unlocked(spec=ModuleSpec(name='napari_script_editor', loader=

File :843, in exec_module(self=, module=)

File :219, in _call_with_frames_removed(f=, *args=( at 0x0000028B37645920, fil...ckages\napari_script_editor__init.py", line 2>, {'builtins': {'ArithmeticError': , 'AssertionError': , 'AttributeError': , 'BaseException': , 'BlockingIOError': , 'BrokenPipeError': , 'BufferError': , 'BytesWarning': , 'ChildProcessError': , 'ConnectionAbortedError': , ...}, 'cached': r'C:\Users\mathi\anaconda3\envs\napari_imaris\lib...script_editor__pycache__init.cpython-38.pyc', 'doc': None, 'file__': r'C:\Users\mathi\anaconda3\envs\napari_imaris\lib\site-packages\napari_script_editor\init.py', 'loader': , 'name': 'napari_script_editor', 'package': 'napari_script_editor', 'path__': [r'C:\Users\mathi\anaconda3\envs\napari_imaris\lib\site-packages\napari_script_editor'], 'spec__': ModuleSpec(name='napari_script_editor', loader=

File ~\anaconda3\envs\napari_imaris\lib\site-packages\napari_script_editor__init.py:7, in 2 version__ = "0.2.8" ----> 7 from ._dock_widget import napari_experimental_provide_dock_widget, ScriptEditor 9 from ._scripts_directory import _search_scripts

File ~\anaconda3\envs\napari_imaris\lib\site-packages\napari_script_editor_dock_widget.py:6, in 5 from pyqode.python.backend import server ----> 6 from pyqode.python.widgets import PyCodeEdit 8 from ._scripts_directory import _init_scripts_directory, _new_template_filename, _exec_code

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\python\widgets__init__.py:8, in 1 """ 2 This packages contains the available python widgets: 3 (...) 6 7 """ ----> 8 from .code_edit import PyCodeEditBase, PyCodeEdit 9 from .interactive import PyInteractiveConsole

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\python\widgets\code_edit.py:6, in 5 import sys ----> 6 from pyqode.core.api import ColorScheme 7 from pyqode.python.backend import server

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\core\api__init__.py:6, in 1 """ 2 This package contains the bases classes of pyqode and some utility 3 functions. 4 5 """ ----> 6 from .code_edit import CodeEdit 7 from .decoration import TextDecoration

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\core\api\code_edit.py:18, in 17 from pyqode.core.dialogs.goto import DlgGotoLine ---> 18 from pyqode.core.managers import BackendManager 19 from pyqode.core.managers import FileManager

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\core\managers__init__.py:15, in 1 """ 2 The managers package contains a series of managers classes for CodeEdit. 3 (...) 13 14 """ ---> 15 from .backend import BackendManager 16 from .decorations import TextDecorationsManager

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\core\managers\backend.py:9, in 7 from qtpy import QtCore ----> 9 from pyqode.core.api.client import JsonTcpClient, BackendProcess 10 from pyqode.core.api.manager import Manager

File ~\anaconda3\envs\napari_imaris\lib\site-packages\pyqode\core\api\client.py:15, in 14 from weakref import ref ---> 15 from qtpy import QtCore, QtNetwork 18 def _logger():

File ~\anaconda3\envs\napari_imaris\lib\site-packages\qtpy\QtNetwork.py:16, in 15 if PYQT5: ---> 16 from PyQt5.QtNetwork import * 17 elif PYQT6:

ValueError: PyCapsule_GetPointer called with incorrect name

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

PluginImportError Traceback (most recent call last) File ~\anaconda3\envs\napari_imaris\lib\site-packages\napari_plugin_engine\manager.py:264, in PluginManager.discover(self=, path=None, entry_point=None, prefix=None, ignore_errors=True) 261 continue 263 try: --> 264 if self._load_and_register(mod_name, name): name = 'ome-types' mod_name = 'ome_types._napari_plugin' self = 265 count += 1 266 self._id_counts[name] = 1

File ~\anaconda3\envs\napari_imaris\lib\site-packages\napari_plugin_engine\manager.py:322, in PluginManager._load_and_register(self=, mod_name='napari_script_editor', plugin_name='napari-script-editor') 320 return None 321 except Exception as exc: --> 322 raise PluginImportError( plugin_name = 'napari-script-editor' 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_script_editor

haesleinhuepf commented 2 years ago

Hi @matfallet ,

thanks for reporting this! Unfortunately, I have no idea what this error message means. Would you mind trying the following? Create a new conda environment and install napari and the script editor: It would be interesting to know if the error happens then as well:

conda create --name napar-script-editor-test
conda activate napar-script-editor-test
conda install -c conda-forge napari
pip install napari-script-editor
napari
matfallet commented 2 years ago

Hi Robert,

yes ok, I see now the editor so it is a python library conflict as usual !

Basically when you use this script editor (example Hello), where do you see the print ?

Nothing happen when I do Run ? Sorry should be evident.

Best, Mathieu


De : Robert Haase @.***> Envoyé : vendredi 15 avril 2022 15:29:57 À : haesleinhuepf/napari-script-editor Cc : Mathieu FALLET; Mention Objet : Re: [haesleinhuepf/napari-script-editor] Bug with the script editor installation ? (Issue #9)

Hi @matfallethttps://github.com/matfallet ,

thanks for reporting this! Unfortunately, I have no idea what this error message means. Would you mind trying the following? Create a new conda environment and install napari and the script editor: It would be interesting to know if the error happens then as well:

conda create --name napar-script-editor-test conda activate napar-script-editor-test conda install -c conda-forge napari pip install napari-script-editor napari

— Reply to this email directly, view it on GitHubhttps://github.com/haesleinhuepf/napari-script-editor/issues/9#issuecomment-1100111544, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ4PCC73SO26QC22AVWO3PTVFFVNLANCNFSM5TN66RBA. You are receiving this because you were mentioned.Message ID: @.***>

haesleinhuepf commented 2 years ago

The output goes to the command line where napari was started from. See also #7

matfallet commented 2 years ago

ok thanks, it was quite obvious !

I try to test napari in order to propose a 3D viewer (like Imaris) to users of the platform and some function (spot detector, surface, scissor) as performant as Imaris can do for 3D image for lightsheet microscopy (3D images around 30GB). I see some spot detectors function (basics) but not too much about creating surface (iso surface with meshing) with pyramidal format.

A second question is how napari configure with the graphic card of the computer , is-it totally automatic, is napari able to handle big image, what is the best format to use then (hdf5, ims )?


De : Robert Haase @.***> Envoyé : vendredi 15 avril 2022 19:42:55 À : haesleinhuepf/napari-script-editor Cc : Mathieu FALLET; Mention Objet : Re: [haesleinhuepf/napari-script-editor] Bug with the script editor installation ? (Issue #9)

The output goes to the command line where napari was started from. See also #7https://github.com/haesleinhuepf/napari-script-editor/issues/7

— Reply to this email directly, view it on GitHubhttps://github.com/haesleinhuepf/napari-script-editor/issues/9#issuecomment-1100256528, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ4PCC6Q5HPELUWDG3MDWX3VFGTB7ANCNFSM5TN66RBA. You are receiving this because you were mentioned.Message ID: @.***>

haesleinhuepf commented 2 years ago

A second question is how napari configure with the graphic card of the computer , is-it totally automatic, is napari able to handle big image, what is the best format to use then (hdf5, ims )?

I suggest to ask that to the napari developers, e.g. on https://image.sc