Skip to content

Plotly generates many warnings because of trying to set structure(NULL) #1299

@daattali

Description

@daattali

This line in plotly:
https://github.com/ropensci/plotly/blob/a76100d7c06774ec50c07982ff6bfdb6d2d09e2d/R/plotly_build.R#L281-L284

can result in setting structure(NULL), which throws many warnings.

I have an app with many plots, and one plot generates dozens of copies of this warning:

Warning in structure(if (i %in% npscales()) uniq(d[[i]]) else d[[i]], class = oldClass(x[[i]])) : Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes. Consider 'structure(list(), *)' instead.

I don't have a minimal reprex because I haven't spent too much time finding out what kind of data can cause a NULL there, but it's definitely a NULL in d[[i]] that causes these warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions