<#4595 [BUG] Flyte vulnerable to being broken by p...
# flyte-github
c
#4595 [BUG] Flyte vulnerable to being broken by plugins in convoluted ways Issue created by liquidcarbon Our data pipeline threw this error until it was traced to a Flyte plugin that the pipeline does not even use.
Copy code
File ~/dev/src/github.com/erisyon/plaster/src/plaster/run/ims_import/ims_import_result.py:5
      2 from pathlib import Path
      3 from typing import Any, List, Optional
----> 5 import flytekit
      6 import numpy as np
      7 import pandas as pd

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/site-packages/flytekit/__init__.py:306
    302         p.load()
    305 # Load all implicit plugins
--> 306 load_implicit_plugins()
    308 # Pretty-print exception messages
    309 if os.environ.get(LOGGING_RICH_FMT_ENV_VAR) != "0":

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/site-packages/flytekit/__init__.py:302, in load_implicit_plugins()
    300 discovered_plugins = entry_points(group="flytekit.plugins")
    301 for p in discovered_plugins:
--> 302     p.load()

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/site-packages/importlib_metadata/__init__.py:209, in EntryPoint.load(self)
    204 """Load the entry point from its definition. If only a module
    205 is indicated by the value, return that module. Otherwise,
    206 return the named object.
    207 """
    208 match = self.pattern.match(self.value)
--> 209 module = import_module(match.group('module'))
    210 attrs = filter(None, (match.group('attr') or '').split('.'))
    211 return functools.reduce(getattr, attrs, module)

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/importlib/__init__.py:127, in import_module(name, package)
    125             break
    126         level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/site-packages/flytekitplugins/deck/__init__.py:17
      1 """
      2 .. currentmodule:: flytekitplugins.deck
      3 
   (...)
     14    TableRenderer
     15 """
---> 17 from .renderer import BoxRenderer, FrameProfilingRenderer, ImageRenderer, MarkdownRenderer, TableRenderer

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/site-packages/flytekitplugins/deck/renderer.py:13
     11 else:
     12     pd = lazy_module("pandas")
---> 13     markdown = lazy_module("markdown")
     14     px = lazy_module("plotly.express")
     15     PIL = lazy_module("PIL")

File ~/.local/share/rtx/installs/python/mambaforge/envs/plaster/lib/python3.9/site-packages/flytekit/lazy_import/lazy_module.py:27, in lazy_module(fullname)
     25 # https://docs.python.org/3/library/importlib.html#implementing-lazy-imports
     26 spec = importlib.util.find_spec(fullname)
---> 27 loader = importlib.util.LazyLoader(spec.loader)
     28 spec.loader = loader
     29 module = importlib.util.module_from_spec(spec)

AttributeError: 'NoneType' object has no attribute 'loader'
It went away after
Copy code
Successfully uninstalled flytekitplugins-deck-standard-1.10.0
Successfully installed flytekitplugins-deck-standard-1.10.2
flyteorg/flyte