Skip to content
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

Unhelpful error message for many facets #1839

Closed
nicolaskruchten opened this issue Oct 22, 2019 · 1 comment
Closed

Unhelpful error message for many facets #1839

nicolaskruchten opened this issue Oct 22, 2019 · 1 comment

Comments

@nicolaskruchten
Copy link
Contributor

Broken off from #1838 (comment)

It was not introduced by this PR, but the behaviour when there is a very large number of cols/rows is weird. For example

px.scatter(gapminder, x="pop", y="lifeExp", facet_row="country")

or

px.scatter(gapminder, x="pop", y="lifeExp", facet_col="country", facet_col_wrap=8)

give errors like

~/code/plotly.py/packages/python/plotly/_plotly_utils/basevalidators.py in raise_invalid_val(self, v, inds)
    281                 typ=type_str(v),
    282                 v=repr(v),
--> 283                 valid_clr_desc=self.description(),
    284             )
    285         )

ValueError: 
    Invalid value of type 'builtins.float' received for the 'domain[1]' property of layout.yaxis
        Received value: -0.010555555555555565

    The 'domain[1]' property is a number and may be specified as:
      - An int or float in the interval [0, 1]

which is not very helpful as an error message. Should we either introduce a limit in the number of cols/rows, or try to catch this and output a better message?

@nicolaskruchten
Copy link
Contributor Author

Dupe of #2556

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

No branches or pull requests

1 participant