-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: ibis.read_parquet fails AttributeError: 'NoneType' object has no attribute 'read_parquet' if the DuckDB backend is not installed #5420
Comments
|
Maybe the install guide should not even display the naked install command: and instead replace it with: (same for conda/mamba). It would be possible to add a paragraph at the end to explain how to do a naked install for development purpose, but this should not be the first command exposed in the doc. |
|
@ogrisel Wonderful feedback ❤️ as usual. I think most or all of these are well within scope for 5.0. |
xref ibis-project#5420 Default to `duckdb` in the install doc, fix the API doc of `default_backend`, and note that the `read_*` functions passthrough to the default backend.
xref ibis-project#5420 Default to `duckdb` in the install doc, fix the API doc of `default_backend`, and note that the `read_*` functions passthrough to the default backend. Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
xref ibis-project#5420 Default to `duckdb` in the install doc, fix the API doc of `default_backend`, and note that the `read_*` functions passthrough to the default backend. Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
xref #5420 Default to `duckdb` in the install doc, fix the API doc of `default_backend`, and note that the `read_*` functions passthrough to the default backend. Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
xref ibis-project#5420 This adds `read_parquet` and `read_csv` as methods to the `FileIOHandler` mixin (renamed from `ResultHandler`). Now every backend will have these two `read_` methods and will raise a `NotImplementedError`.
…backend Follow up on ibis-project#5423 xref ibis-project#5420 This also adds single quotes around bracketed pip install commands to make sure they work with zsh which is the default shell on macOS.
…backend Follow up on ibis-project#5423 xref ibis-project#5420 This also adds single quotes around bracketed pip install commands to make sure they work with zsh which is the default shell on macOS.
…backend Follow up on ibis-project#5423 xref ibis-project#5420 This also adds single quotes around bracketed pip install commands to make sure they work with zsh which is the default shell on macOS.
…backend Follow up on ibis-project#5423 xref ibis-project#5420 This also adds single quotes around bracketed pip install commands to make sure they work with zsh which is the default shell on macOS.
xref ibis-project#5420 This adds `read_parquet` and `read_csv` as methods to the `FileIOHandler` mixin (renamed from `ResultHandler`). Now every backend will have these two `read_` methods and will raise a `NotImplementedError`. Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
xref #5420 This adds `read_parquet` and `read_csv` as methods to the `FileIOHandler` mixin (renamed from `ResultHandler`). Now every backend will have these two `read_` methods and will raise a `NotImplementedError`. Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
|
I removed: from the todo list and instead opened a dedicated issue #5436 as it's quite unrelated to the DOC/UX focus of this report. |
What happened?
This is mostly a UX problem, I am not sure what fixes are best. Let's start with the reproducer to highlight how a naive user (e.g. myself :) could get confused by the current state of the online doc and public API:
ibis-frameworkin a fresh Python environment with the default instructions at the top of https://ibis-project.org/docs/4.1.0/install/or alternatively, install ibis with a backend that would be expected to naturally support parquet file reading (but not duckdb):
ibis.read_parquet:At least the error message should be improved to state that no default backend has been configured and point to the documentation on how to do so.
I googled and found:
str(likely the backend name) should be a valid type for that config option:But then:
But then even if configuring as follows does not work:
Let's try again with a backend that exposes the
read_parquetmethod explicitly:Is this expected to work? If so I can open a dedicated issue.
EDIT: done at #5436.
Then I tried with polars and it works
So from that experiment here is a summary of the UX / doc fixes that could improve the Ibis onboarding experience:
ibis.read_parquetto mention that they delegate to methods with the same name on the backend configured as default inibis.config.default_backend;ibis.config.default_backendto not advertise for thestrtype and pass a backend instance instead;or alternatively make it possible to pass a backend name instead of an instance;ibis.read_parquetshould probably fail with an explicit error message whenibis.get_backend() is Noneand suggest to install the default duckdb backend or configure an alternative backend that has direct support forread_parquet;ibis.get_backend()ibis.config._default_backend()directly raise a warning or an exception when duckdb is not installed and no validibis.config.default_backendhas been configured?read_parquetmethod on all backend classes, raisingNotImplementedErrorwhen not easy to support natively and potentially pointing to the contributors guide :)What version of ibis are you using?
4.1.0
What backend(s) are you using, if any?
dask
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: