quarto does not seem to work with extension of iTables

Open
#10,957 5 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Oct 4, 2024.

Assessment

This issue has not been assessed yet.

Description

bug engines-jupyter
Bug description

quarto does not seem to work with "searchBuilder" or "searchPanes" extension of iTables

Steps to reproduce
---
title: Reproducible Quarto Document
format: dashboard
embed-resources: true
jupyter: python3
---

```{python}
import pandas as pd
from itables import options, show

# options.dom = 'fiBrtlp'
# options.maxBytes = 1024 * 1024
# options.language = dict(info = "Showing _TOTAL_ entries")
# options.classes = "display nowrap compact"
options.paging = True
# options.searching = True
# options.ordering = True
# options.info = True
# options.lengthChange = False
# options.autoWidth = False
# options.responsive = True
# options.keys = True
options.buttons = ["copy", "excel", "pdf"]
```

```{python}
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]
df = pd.DataFrame(x, index=y)
show(
    df,
    layout={"top1": "searchBuilder"},
)
```

for Extension searchBuilder

Starting python3 kernel...Done

Executing 'issue.quarto_ipynb'
  Cell 1/2: ''...Done
  Cell 2/2: ''...ERROR:

An error occurred while executing the following cell:
------------------
x = [1, 2, 3, 4, 5]
y = [1, 4, 9, 16, 25]
df = pd.DataFrame(x, index=y)
show(
    df,
    layout={"top1": "searchBuilder"},
)
------------------

Both raise the same error :

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[2], line 4
      2 y = [1, 4, 9, 16, 25]
      3 df = pd.DataFrame(x, index=y)
----> 4 show(
      5     df,
      6     layout={"top1": "searchBuilder"},
      7 )

File C:\ProgramData\miniconda3\envs\DLL_ETL\Lib\site-packages\itables\javascript.py:989, in show(df, caption, **kwargs)
    987 """Show a dataframe"""
    988 connected = kwargs.pop("connected", ("dt_url" in kwargs) or _CONNECTED)
--> 989 html = to_html_datatable(df, caption=caption, connected=connected, **kwargs)
    990 display(HTML(html))

File C:\ProgramData\miniconda3\envs\DLL_ETL\Lib\site-packages\itables\javascript.py:394, in to_html_datatable(df, caption, table_id, connected, use_to_html, **kwargs)
    387     if "fnInfoCallback" not in kwargs:
    388         kwargs["fnInfoCallback"] = JavascriptFunction(
    389             "function (oSettings, iStart, iEnd, iMax, iTotal, sPre) {{ return sPre + ' ({warning})'; }}".format(
    390                 warning=downsampling_warning
    391             )
    392         )
--> 394 _adjust_layout(
    395     df,
    396     kwargs,
    397     downsampling_warning=downsampling_warning,
    398     warn_on_dom=kwargs.pop("warn_on_dom"),
    399 )
    401 footer = kwargs.pop("footer")
    402 column_filters = kwargs.pop("column_filters")

File C:\ProgramData\miniconda3\envs\DLL_ETL\Lib\site-packages\itables\javascript.py:929, in _adjust_layout(df, kwargs, downsampling_warning, warn_on_dom)
    924     warnings.warn(
    925         "The
Expected behavior

No response

Actual behavior

No response

Your environment
  • IDE: vsCode
  • Windows 10 Enterprise 20H2
Quarto check output
Quarto 1.5.57
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.5.57
      Path: C:\ProgramData\chocolatey\lib\quarto\tools\bin
      CodePage: 1252
[>] Checking tools....................OK
      TinyTeX: v2024.09
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\PBE00A26\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2024

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.12.6 (Conda)
      Path: C:/ProgramData/miniconda3/envs/DLL_ETL/python.exe
      Jupyter: 5.7.2
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.