tdmorello / napari-geojson

BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Importing a geojson feature collection #8

Open govinda-kamath opened 2 months ago

govinda-kamath commented 2 months ago

I was trying to import a GEOJSON [test_feature_collection.geojson.txt] with polygons into napari using the napari-geojson plug-in; but it seems to break. I was wondering if I had to process it in some way to use it.

Error message:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/components/viewer_model.py:1323, in ViewerModel._open_or_raise_error(self=Viewer(camera=Camera(center=(0.0, 17370.07907932...use_drag_gen={}, _mouse_wheel_gen={}, _keymap={}), paths=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], kwargs={}, layer_type=None, stack=False)
   1322 try:
-> 1323     added = self._add_layers_with_plugins(
        self = Viewer(camera=Camera(center=(0.0, 17370.079079327268, 18374.39111027339), zoom=0.03738942150281553, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(23601.78935632481, 28805.149793666133), scaled=True, style=<CursorStyle.STANDARD: 'standard'>, size=1.0), dims=Dims(ndim=2, ndisplay=2, order=(0, 1), axis_labels=('0', '1'), rollable=(True, True), range=(RangeTuple(start=0.0, stop=36157.0, step=1.0), RangeTuple(start=0.0, stop=29822.0, step=1.0)), margin_left=(0.0, 0.0), margin_right=(0.0, 0.0), point=(18078.0, 14911.0), last_used=0), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[<Image layer 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01' at 0x18b1c15d0>], help='use <2> for transform', status={'layer_name': 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01', 'layer_base': 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01.tif', 'source_type': 'plugin', 'plugin': 'napari builtins', 'coordinates': ' [23602 28805]: [232, 180, 228]'}, tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x17e2d6cb0>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, _keymap={})
        paths = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        kwargs = {}
        stack = False
        plugin = 'napari-geojson'
        layer_type = None
   1324         paths,
   1325         kwargs=kwargs,
   1326         stack=stack,
   1327         plugin=plugin,
   1328         layer_type=layer_type,
   1329     )
   1330 # plugin failed

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/components/viewer_model.py:1413, in ViewerModel._add_layers_with_plugins(self=Viewer(camera=Camera(center=(0.0, 17370.07907932...use_drag_gen={}, _mouse_wheel_gen={}, _keymap={}), paths=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], stack=False, kwargs={}, plugin='napari-geojson', layer_type=None)
   1412     assert len(paths) == 1
-> 1413     layer_data, hookimpl = read_data_with_plugins(
        paths = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        stack = False
        plugin = 'napari-geojson'
   1414         paths, plugin=plugin, stack=stack
   1415     )
   1417 if layer_data is None:

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/plugins/io.py:139, in read_data_with_plugins(paths=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], plugin='napari-geojson', stack=False)
    138 hookimpl = hook_caller.get_plugin_implementation(plugin)
--> 139 layer_data = reader(npe1_path)
        npe1_path = '/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'
        reader = <function reader_function at 0x183c33370>
    140 # if the reader returns a "null layer" sentinel indicating an empty
    141 # file, return an empty list, otherwise return the result or None

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari_geojson/_reader.py:62, in reader_function(path='/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson')
     61 paths = [path] if isinstance(path, str) else path
---> 62 return [geojson_to_napari(_path) for _path in paths]
        paths = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari_geojson/_reader.py:62, in <listcomp>(.0=<list_iterator object>)
     61 paths = [path] if isinstance(path, str) else path
---> 62 return [geojson_to_napari(_path) for _path in paths]
        _path = '/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari_geojson/_reader.py:78, in geojson_to_napari(fname='/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson')
     77 shapes = [get_shape(geom) for geom in collection]
---> 78 shape_types = [get_shape_type(geom) for geom in collection]
        collection = [{"geometry": {"coordinates": [[[2749.458496, 3946.0], [2749.208008, 3947.433838], [2749.115479, 3948.947266], [2748.754395, 3950.513184], [2748.058105, 3952.058105], [2747.018066, 3953.51001], [2745.532959, 3954.529053], [2743.71582, 3954.625488], [2742.0, 3954.986816], [2740.316895, 3954.461914], [2738.506348, 3954.434326], [2736.845703, 3953.713867], [2735.365479, 3952.634521], [2734.272949, 3951.163086], [2733.415771, 3949.555664], [2733.596436, 3947.671631], [2733.549072, 3946.0], [2734.112305, 3944.431152], [2734.547852, 3942.913086], [2735.326172, 3941.540527], [2736.280518, 3940.280518], [2737.198975, 3938.814697], [2738.527344, 3937.616455], [2740.234863, 3937.125732], [2742.0, 3936.173828], [2743.906006, 3936.417969], [2745.880615, 3936.631592], [2747.365723, 3937.969482], [2748.483398, 3939.516602], [2749.121094, 3941.241699], [2749.587158, 3942.857178], [2749.526367, 3944.50293], [2749.458496, 3946.0]]], "type": "Polygon"}, "properties": {"cell_id": 1, "classification": {"color": [230, 25, 75], "name": "Unclustered"}}, "type": "Feature"}, {"geometry": {"coordinates": [[[2496.430664, 2422.0], [2495.767578, 2424.34082], [2495.279297, 2426.672119], [2493.92041, 2428.628662], [2492.409912, 2430.409912], [2490.681396, 2431.999512], [2488.722168, 2433.400146], [2486.44873, 2434.311035], [2484.0, 2435.162842], [2481.448975, 2434.824463], [2478.820557, 2434.50415], [2476.457275, 2433.28833], [2474.170166, 2431.829834], [2472.199463, 2429.884766], [2470.458008, 2427.609375], [2469.939209, 2424.796875], [2469.13501, 2422.0], [2470.210693, 2419.25708], [2471.05957, 2416.639893], [2473.011475, 2414.657715], [2475.136963, 2413.136963], [2477.461426, 2412.2146], [2479.623535, 2411.434082], [2481.912109, 2411.503662], [2484.0, 2410.934082], [2486.140625, 2411.238037], [2488.489502, 2411.161621], [2490.695557, 2411.979248], [2492.881104, 2413.118896], [2494.55957, 2414.944336], [2495.943848, 2417.052734], [2496.062744, 2419.600586], [2496.430664, 2422.0]]], "type": "Polygon"}, "properties": {"cell_id": 2, "classification": {"color": [230, 25, 75], "name": "Unclustered"}}, "type": "Feature"}]
     79 meta = {"shape_type": shape_types}

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari_geojson/_reader.py:78, in <listcomp>(.0=<list_iterator object>)
     77 shapes = [get_shape(geom) for geom in collection]
---> 78 shape_types = [get_shape_type(geom) for geom in collection]
        geom = {"geometry": {"coordinates": [[[2749.458496, 3946.0], [2749.208008, 3947.433838], [2749.115479, 3948.947266], [2748.754395, 3950.513184], [2748.058105, 3952.058105], [2747.018066, 3953.51001], [2745.532959, 3954.529053], [2743.71582, 3954.625488], [2742.0, 3954.986816], [2740.316895, 3954.461914], [2738.506348, 3954.434326], [2736.845703, 3953.713867], [2735.365479, 3952.634521], [2734.272949, 3951.163086], [2733.415771, 3949.555664], [2733.596436, 3947.671631], [2733.549072, 3946.0], [2734.112305, 3944.431152], [2734.547852, 3942.913086], [2735.326172, 3941.540527], [2736.280518, 3940.280518], [2737.198975, 3938.814697], [2738.527344, 3937.616455], [2740.234863, 3937.125732], [2742.0, 3936.173828], [2743.906006, 3936.417969], [2745.880615, 3936.631592], [2747.365723, 3937.969482], [2748.483398, 3939.516602], [2749.121094, 3941.241699], [2749.587158, 3942.857178], [2749.526367, 3944.50293], [2749.458496, 3946.0]]], "type": "Polygon"}, "properties": {"cell_id": 1, "classification": {"color": [230, 25, 75], "name": "Unclustered"}}, "type": "Feature"}
     79 meta = {"shape_type": shape_types}

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari_geojson/_reader.py:106, in get_shape_type(geom={"geometry": {"coordinates": [[[2749.458496, 394... 75], "name": "Unclustered"}}, "type": "Feature"})
    105 else:
--> 106     raise ValueError(f"No matching napari shape for {geom.type}")
        geom = {"geometry": {"coordinates": [[[2749.458496, 3946.0], [2749.208008, 3947.433838], [2749.115479, 3948.947266], [2748.754395, 3950.513184], [2748.058105, 3952.058105], [2747.018066, 3953.51001], [2745.532959, 3954.529053], [2743.71582, 3954.625488], [2742.0, 3954.986816], [2740.316895, 3954.461914], [2738.506348, 3954.434326], [2736.845703, 3953.713867], [2735.365479, 3952.634521], [2734.272949, 3951.163086], [2733.415771, 3949.555664], [2733.596436, 3947.671631], [2733.549072, 3946.0], [2734.112305, 3944.431152], [2734.547852, 3942.913086], [2735.326172, 3941.540527], [2736.280518, 3940.280518], [2737.198975, 3938.814697], [2738.527344, 3937.616455], [2740.234863, 3937.125732], [2742.0, 3936.173828], [2743.906006, 3936.417969], [2745.880615, 3936.631592], [2747.365723, 3937.969482], [2748.483398, 3939.516602], [2749.121094, 3941.241699], [2749.587158, 3942.857178], [2749.526367, 3944.50293], [2749.458496, 3946.0]]], "type": "Polygon"}, "properties": {"cell_id": 1, "classification": {"color": [230, 25, 75], "name": "Unclustered"}}, "type": "Feature"}

ValueError: No matching napari shape for Feature

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

ReaderPluginError                         Traceback (most recent call last)
File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/_qt/qt_viewer.py:981, in QtViewer._qt_open(self=<napari._qt.qt_viewer.QtViewer object>, filenames=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], stack=False, choose_plugin=False, plugin=None, layer_type=None, **kwargs={})
    980 try:
--> 981     self.viewer.open(
        self = <napari._qt.qt_viewer.QtViewer object at 0x1831e7130>
        self.viewer = Viewer(camera=Camera(center=(0.0, 17370.079079327268, 18374.39111027339), zoom=0.03738942150281553, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(23601.78935632481, 28805.149793666133), scaled=True, style=<CursorStyle.STANDARD: 'standard'>, size=1.0), dims=Dims(ndim=2, ndisplay=2, order=(0, 1), axis_labels=('0', '1'), rollable=(True, True), range=(RangeTuple(start=0.0, stop=36157.0, step=1.0), RangeTuple(start=0.0, stop=29822.0, step=1.0)), margin_left=(0.0, 0.0), margin_right=(0.0, 0.0), point=(18078.0, 14911.0), last_used=0), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[<Image layer 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01' at 0x18b1c15d0>], help='use <2> for transform', status={'layer_name': 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01', 'layer_base': 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01.tif', 'source_type': 'plugin', 'plugin': 'napari builtins', 'coordinates': ' [23602 28805]: [232, 180, 228]'}, tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x17e2d6cb0>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, _keymap={})
        filenames = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        stack = False
        plugin = None
        layer_type = None
        kwargs = {}
    982         filenames,
    983         stack=stack,
    984         plugin=plugin,
    985         layer_type=layer_type,
    986         **kwargs,
    987     )
    988 except ReaderPluginError as e:

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/components/viewer_model.py:1223, in ViewerModel.open(self=Viewer(camera=Camera(center=(0.0, 17370.07907932...use_drag_gen={}, _mouse_wheel_gen={}, _keymap={}), path=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], stack=False, plugin=None, layer_type=None, **kwargs={})
   1221 # no plugin choice was made
   1222 else:
-> 1223     layers = self._open_or_raise_error(
        layers = <module 'napari.layers' from '/Users/govinda.kamath/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/layers/__init__.py'>
        self = Viewer(camera=Camera(center=(0.0, 17370.079079327268, 18374.39111027339), zoom=0.03738942150281553, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(23601.78935632481, 28805.149793666133), scaled=True, style=<CursorStyle.STANDARD: 'standard'>, size=1.0), dims=Dims(ndim=2, ndisplay=2, order=(0, 1), axis_labels=('0', '1'), rollable=(True, True), range=(RangeTuple(start=0.0, stop=36157.0, step=1.0), RangeTuple(start=0.0, stop=29822.0, step=1.0)), margin_left=(0.0, 0.0), margin_right=(0.0, 0.0), point=(18078.0, 14911.0), last_used=0), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[<Image layer 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01' at 0x18b1c15d0>], help='use <2> for transform', status={'layer_name': 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01', 'layer_base': 'SJ0438_HD_ColonCa_3um_01_rescan_01_20x_BF_01.tif', 'source_type': 'plugin', 'plugin': 'napari builtins', 'coordinates': ' [23602 28805]: [232, 180, 228]'}, tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=True, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x17e2d6cb0>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, _keymap={})
        _path = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        _stack = False
        kwargs = {}
        layer_type = None
   1224         _path, kwargs, layer_type, _stack
   1225     )
   1226     added.extend(layers)

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/components/viewer_model.py:1332, in ViewerModel._open_or_raise_error(self=Viewer(camera=Camera(center=(0.0, 17370.07907932...use_drag_gen={}, _mouse_wheel_gen={}, _keymap={}), paths=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], kwargs={}, layer_type=None, stack=False)
   1331     except Exception as e:
-> 1332         raise ReaderPluginError(
        trans = <napari.utils.translations.TranslationBundle object at 0x11b3433a0>
        plugin = 'napari-geojson'
        paths = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
   1333             trans._(
   1334                 'Tried opening with {plugin}, but failed.',
   1335                 deferred=True,
   1336                 plugin=plugin,
   1337             ),
   1338             plugin,
   1339             paths,
   1340         ) from e
   1341 # multiple plugins
   1342 else:

ReaderPluginError: Tried opening with napari-geojson, but failed.

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

ReaderPluginError                         Traceback (most recent call last)
File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/app_model/backends/qt/_qaction.py:55, in QCommandAction._on_triggered(self=QMenuItemAction(MenuItem(when=None, group='1_ope...tle=None, toggled=None), alt=None), app='napari'), checked=False)
     51 def _on_triggered(self, checked: bool) -> None:
     52     # execute_command returns a Future, for the sake of eventually being
     53     # asynchronous without breaking the API.  For now, we call result()
     54     # to raise any exceptions.
---> 55     self._app.commands.execute_command(self._command_id).result()
        self._command_id = 'napari.window.file.open_files_dialog'
        self = QMenuItemAction(MenuItem(when=None, group='1_open', order=None, command=CommandRule(id='napari.window.file.open_files_dialog', title='Open File(s)...', category=None, tooltip=None, status_tip=None, icon=None, icon_visible_in_menu=True, enablement=None, short_title=None, toggled=None), alt=None), app='napari')
        self._app = Application('napari')

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/app_model/registries/_commands_reg.py:245, in CommandsRegistry.execute_command(self=<CommandsRegistry at 0x17ed1ebc0 (142 commands)>, id='napari.window.file.open_files_dialog', execute_asynchronously=False, *args=(), **kwargs={})
    241 except Exception as e:
    242     if self._raise_synchronous_exceptions:
    243         # note, the caller of this function can also achieve this by
    244         # calling `future.result()` on the returned future object.
--> 245         raise e
    246     future.set_exception(e)
    248 return future

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/app_model/registries/_commands_reg.py:240, in CommandsRegistry.execute_command(self=<CommandsRegistry at 0x17ed1ebc0 (142 commands)>, id='napari.window.file.open_files_dialog', execute_asynchronously=False, *args=(), **kwargs={})
    238 future: Future = Future()
    239 try:
--> 240     future.set_result(cmd(*args, **kwargs))
        future = <Future at 0x183215840 state=pending>
        cmd = <function QtViewer._open_files_dialog at 0x18b169fc0>
        args = ()
        kwargs = {}
    241 except Exception as e:
    242     if self._raise_synchronous_exceptions:
    243         # note, the caller of this function can also achieve this by
    244         # calling `future.result()` on the returned future object.

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/in_n_out/_store.py:934, in Store.inject_processors.<locals>._deco.<locals>._exec(*args=(), **kwargs={})
    932 @wraps(func)
    933 def _exec(*args: P.args, **kwargs: P.kwargs) -> R:
--> 934     result = func(*args, **kwargs)
        func = <function QtViewer._open_files_dialog at 0x18b169e10>
        args = ()
        kwargs = {}
    935     if result is not None:
    936         self.process(
    937             result,
    938             type_hint=type_hint,
   (...)
    941             _funcname=getattr(func, "__qualname__", str(func)),
    942         )

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/in_n_out/_store.py:804, in Store.inject.<locals>._inner.<locals>._exec(*args=(), **kwargs={})
    797 logger.debug(
    798     "  Calling %s with %r (injected %r)",
    799     _fname,
    800     bound.arguments,
    801     _injected_names,
    802 )
    803 try:
--> 804     result = func(**bound.arguments)
        bound = <BoundArguments (choose_plugin=False, stack=False, self=<napari._qt.qt_viewer.QtViewer object at 0x1831e7130>)>
        func = <function QtViewer._open_files_dialog at 0x17ed06a70>
        bound.arguments = {'choose_plugin': False, 'stack': False, 'self': <napari._qt.qt_viewer.QtViewer object at 0x1831e7130>}
    805 except TypeError as e:
    806     if "missing" not in e.args[0]:

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/_qt/qt_viewer.py:918, in QtViewer._open_files_dialog(self=<napari._qt.qt_viewer.QtViewer object>, choose_plugin=False, stack=False)
    915 filenames = self._open_file_dialog_uni(trans._('Select file(s)...'))
    917 if filenames:
--> 918     self._qt_open(filenames, choose_plugin=choose_plugin, stack=stack)
        filenames = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        self = <napari._qt.qt_viewer.QtViewer object at 0x1831e7130>
        choose_plugin = False
        stack = False
    919     update_open_history(filenames[0])

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/_qt/qt_viewer.py:989, in QtViewer._qt_open(self=<napari._qt.qt_viewer.QtViewer object>, filenames=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], stack=False, choose_plugin=False, plugin=None, layer_type=None, **kwargs={})
    981     self.viewer.open(
    982         filenames,
    983         stack=stack,
   (...)
    986         **kwargs,
    987     )
    988 except ReaderPluginError as e:
--> 989     handle_gui_reading(
        filenames = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        self = <napari._qt.qt_viewer.QtViewer object at 0x1831e7130>
        stack = False
        layer_type = None
        kwargs = {}
    990         filenames,
    991         self,
    992         stack,
    993         e.reader_plugin,
    994         e,
    995         layer_type=layer_type,
    996         **kwargs,
    997     )
    998 except MultipleReaderError:
    999     handle_gui_reading(filenames, self, stack, **kwargs)

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/_qt/dialogs/qt_reader_dialog.py:190, in handle_gui_reading(paths=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], qt_viewer=<napari._qt.qt_viewer.QtViewer object>, stack=False, plugin_name='napari-geojson', error=ReaderPluginError('Tried opening with napari-geojson, but failed.'), plugin_override=False, **kwargs={'layer_type': None})
    163 """Present reader dialog to choose reader and open paths based on result.
    164 
    165 This function is called whenever ViewerModel._open_or_get_error returns
   (...)
    187     Dictates whether checkbox to remember choice is unchecked by default
    188 """
    189 _path = paths[0]
--> 190 readers = prepare_remaining_readers(paths, plugin_name, error)
        paths = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        plugin_name = 'napari-geojson'
        error = ReaderPluginError('Tried opening with napari-geojson, but failed.')
    191 error_message = str(error) if error else ''
    192 readerDialog = QtReaderDialog(
    193     parent=qt_viewer,
    194     pth=_path,
   (...)
    197     persist_checked=plugin_override,
    198 )

File ~/miniforge3/envs/napari-env/lib/python3.10/site-packages/napari/_qt/dialogs/qt_reader_dialog.py:245, in prepare_remaining_readers(paths=['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'], plugin_name='napari-geojson', error=ReaderPluginError('Tried opening with napari-geojson, but failed.'))
    243 # if there's no other readers left, raise the exception
    244 if not readers and error:
--> 245     raise ReaderPluginError(
        trans = <napari.utils.translations.TranslationBundle object at 0x11b3433a0>
        paths[0] = '/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson'
        paths = ['/Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson']
        len(paths) > 1 = False
        len(paths) = 1
        plugin_name = 'napari-geojson'
        error = ReaderPluginError('Tried opening with napari-geojson, but failed.')
    246         trans._(
    247             'Tried to read {path_message} with plugin {plugin}, because it was associated with that file extension/because it is the only plugin capable of reading that path, but it gave an error. Try associating a different plugin or installing a different plugin for this kind of file.',
    248             path_message=(
    249                 f'[{paths[0]}, ...]' if len(paths) > 1 else paths[0]
    250             ),
    251             plugin=plugin_name,
    252         ),
    253         plugin_name,
    254         paths,
    255     ) from error
    257 return readers

ReaderPluginError: Tried to read /Users/govinda.kamath/Code/tiff_craziness/test_feature_collection.geojson with plugin napari-geojson, because it was associated with that file extension/because it is the only plugin capable of reading that path, but it gave an error. Try associating a different plugin or installing a different plugin for this kind of file.
govinda-kamath commented 2 months ago

These is the contents of my napari-info

napari: 0.5.3
Platform: macOS-13.5.2-x86_64-i386-64bit
System: MacOS 13.5.2
Python: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:53:34) [Clang 16.0.6 ]
Qt: 5.15.8
PyQt5: 5.15.9
NumPy: 1.26.4
SciPy: 1.14.1
Dask: 2024.9.0
VisPy: 0.14.3
magicgui: 0.8.3
superqt: 0.6.7
in-n-out: 0.2.1
app-model: 0.2.8
npe2: 0.7.7

OpenGL:
- GL version: 2.1 INTEL-20.6.4
- MAX_TEXTURE_SIZE: 16384
- GL_MAX_3D_TEXTURE_SIZE: 2048

Screens:
- screen 1: resolution 1440x900, scale 2.0

Optional:
- numba: 0.60.0
- triangle not installed
- napari-plugin-manager: 0.1.1