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.

.opts / .options warning raised when no options are set

See original GitHub issue

When calling .opts on an element without passing any options a warning is emitted.

import holoviews as hv
hv.extension('bokeh')

hv.Scatter([0]).opts()
WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated. Use the .options method converting to the simplified format instead or use hv.opts.apply_groups for backward compatibility.

Users are unlikely to write that directly, but libraries like GeoViews use that in various places, for example: https://github.com/holoviz/geoviews/blob/master/geoviews/element/geo.py#L149-L150

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jlstevenscommented, Oct 27, 2022

As .opts.clear() exists already, the easiest thing is to do nothing when you have an empty.opts (so it is a no-op, without the warning).

1reaction
Hoxbrocommented, Oct 27, 2022

I noticed that an empty opts will reset previous options, this should not be the case in my opinion.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

pyviz/pyviz - Gitter
Hi all, wondering if there is access to horizontal node location in hv.Sankey ? I see pos is required for from_networkx, but seems...
Read more >
Warning Options (Using the GNU Compiler Collection (GCC))
When an unrecognized warning option is requested (e.g., -Wunknown-warning ), GCC emits a diagnostic stating that the option is not recognized.
Read more >
Releases — HoloViews v1.15.3
Do not raise deprecated .opts warning for empty groups (#5144). Handle unsigned integer dtype in ... Set histogram normed option to False by...
Read more >
HSPICE Reference Manual: Commands and Control Options
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, ... OPTION BIAWARN to 1, HSPICE immediately outputs a warning ... OPTION...
Read more >
How to use the holoviews.core.util function in ... - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix ... the option group semantics now offered...
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