Skip to content

Missing optional dependency Jinja2 when publishing #9

@MSlootwegVIKTOR

Description

@MSlootwegVIKTOR

Since version 0.1.3 has been released, I've encountered packing errors when publishing. After investigation, it seemed to be happen since the release of v0.1.3. The project did not pin the version of viktor_table_view, therefore finding the culprit not difficult.

Here is the error:

  ERROR   packing completed with errors: Could not generate manifest:
           Traceback (most recent call last):
            File "/tmp/wd/dist/site-packages-layer/usr/local/lib/python3.12/site-packages/pandas/compat/_optional.py", line 141, in import_optional_dependency
              module = importlib.import_module(name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
              return _bootstrap._gcd_import(name[level:], package, level)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
            File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
            File "<frozen importlib._bootstrap>", line 1318, in _find_and_load_unlocked
          ModuleNotFoundError: No module named 'jinja2'
         
          During handling of the above exception, another exception occurred:
         
          Traceback (most recent call last):
            File "viktor_connector/connector.pyx", line 693, in connector.ManifestHandler.run
            File "/tmp/wd/dist/app-code-layer/home/user/src/app/__init__.py", line 7, in <module>
              from app.app_analysis.controller import AppAnalysisController as AppAnalysis
            File "/tmp/wd/dist/app-code-layer/home/user/src/app/app_analysis/controller.py", line 12, in <module>
              from viktor_table_view import TableView, TableResult
            File "/tmp/wd/dist/site-packages-layer/usr/local/lib/python3.12/site-packages/viktor_table_view/__init__.py", line 2, in <module>
              from viktor_table_view.table_view import TableResult
            File "/tmp/wd/dist/site-packages-layer/usr/local/lib/python3.12/site-packages/viktor_table_view/table_view.py", line 11, in <module>
              from pandas.io.formats.style import Styler
            File "/tmp/wd/dist/site-packages-layer/usr/local/lib/python3.12/site-packages/pandas/io/formats/style.py", line 56, in <module>
              jinja2 = import_optional_dependency("jinja2", extra="DataFrame.style requires jinja2.")
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/tmp/wd/dist/site-packages-layer/usr/local/lib/python3.12/site-packages/pandas/compat/_optional.py", line 144, in import_optional_dependency
              raise ImportError(msg)
          ImportError: Missing optional dependency 'Jinja2'. DataFrame.style requires jinja2. Use pip or conda to install Jinja2.
         
          2024-04-08 09:54:57.808 ERROR   : Missing optional dependency 'Jinja2'. DataFrame.style requires jinja2. Use pip or conda to install Jinja2.
          error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions