question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MaxRowsError better error message

See original GitHub issue

I’ve been running into this error a decent bit and a nice QoL change would be to include the command to ignore it in the error message. I’d be happy to create a PR if that sounds good.

I’d change the message here https://github.com/altair-viz/altair/blob/d862ad494ecc0a5cff7e8b114df14e0796efa108/altair/utils/data.py#L61 to

MaxRowsError(
            "The number of rows in your dataset is greater "
            "than the maximum allowed ({}). "
            "For information on how to plot larger datasets "
            "in Altair, see the documentation or add 'alt.data_transformers.disable_max_rows()' to your code".format(max_rows)
        )

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jakevdpcommented, Jan 6, 2021

We could maybe say something like

To disable this error, set 'alt.data_transformers.disable_max_rows()' BUT BEWARE: doing so may result in crashing your browser session and corrupting your notebook if not done carefully; see https://altair-viz.github.io/user_guide/faq.html#maxrowserror-how-can-i-plot-large-datasets for details.

I just want to make certain users understand that disabling max rows can have unfortunate consequences.

0reactions
EntilZhacommented, Jan 6, 2021

I suppose I wasn’t aware of that, I thought it was mainly to limit the number of SVG elements, but I could certainly see where that could cause issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently Asked Questions — Altair 4.2.0 documentation
MaxRowsError: The number of rows in your dataset is greater than the maximum allowed (5000). For information on how to plot larger datasets...
Read more >
Using Altair on data aggregated from large datasets
Altair charts work by sending the entire dataset to your browser and processing it in the frontend; for this reason it does not...
Read more >
Altair plot is empty when alt.data_transformers.enable('json ...
When dataset has more than 5K rows, Altair outputs a warning that it's too ... viz.github.io/user_guide/faq.html#maxrowserror-how-can-i-plot-large-datasets.
Read more >
Max Rows Error? - Google Groups
Fatal error: Call to undefined method PHRETS\Session::IsMaxrowsReached() in E:\wamp\www\RETS\test_fetch.php on line 56. Here is my code (NOTE: config.php is ...
Read more >
Excel max rows error - Adeptia Help
Error: We received this error for a map that transforms a ... The maximum number of rows permitted on a worksheet been exceeded....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found