Skip to content

Broken Panel Kmeans Example  #25

@ananth1996

Description

@ananth1996

Came across PyScript and wanted to see how to use it with Pandas as Sklearn. However, the Panel KMeans example is broken with the following error:

Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 499, in eval_code
    .run(globals, locals)
     ^^^^^^^^^^^^^^^^^^^^
  File "/lib/python311.zip/_pyodide/_base.py", line 340, in run
    coroutine = eval(self.code, globals, locals)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<exec>", line 41, in <module>
  File "/lib/python3.11/site-packages/altair/__init__.py", line 649, in <module>
    from altair.vegalite import *
  File "/lib/python3.11/site-packages/altair/vegalite/__init__.py", line 2, in <module>
    from .v5 import *
  File "/lib/python3.11/site-packages/altair/vegalite/v5/__init__.py", line 2, in <module>
    from altair.expr.core import datum
  File "/lib/python3.11/site-packages/altair/expr/__init__.py", line 11, in <module>
    from altair.expr.core import ConstExpression, FunctionExpression
  File "/lib/python3.11/site-packages/altair/expr/core.py", line 6, in <module>
    from altair.utils import SchemaBase
  File "/lib/python3.11/site-packages/altair/utils/__init__.py", line 14, in <module>
    from .plugin_registry import PluginRegistry
  File "/lib/python3.11/site-packages/altair/utils/plugin_registry.py", line 13, in <module>
    from typing_extensions import TypeIs
ImportError: cannot import name 'TypeIs' from 'typing_extensions' (/lib/python3.11/site-packages/typing_extensions.py)

Quick Googling reveals it might be a version issue with typing_extensions library and might need to be fixed somewhere.
I'll take a look soon and see if I can fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions