Skip to content

Move pyarrow to runtime import in datasets endpoint#704

Open
Creylay wants to merge 1 commit into
developfrom
fix/pyarrow-runtime-import
Open

Move pyarrow to runtime import in datasets endpoint#704
Creylay wants to merge 1 commit into
developfrom
fix/pyarrow-runtime-import

Conversation

@Creylay

@Creylay Creylay commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

pyarrow was imported inside the TYPE_CHECKING block, which is only evaluated by static analysis tools (e.g., mypy), not at runtime. This caused a NameError when creating a new notebook, since the filter_dataset_file endpoint references pa at runtime.


Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/back/api/api_v1/endpoints/datasets.py: moved import pyarrow as pa out of the TYPE_CHECKING block into the top-level runtime imports.

Testing (optional)

Create a new notebook — the endpoint should no longer raise NameError: name 'pa' is not defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant