Search code examples
pythonplotlyspydercode-completion

Code-complete with plotly.graph_objs class in Spyder IDE (5.2.1) does not work as intended


The Spyder Code-completion with plotly.graph_objs class does not display the right functions.

The function plotly.graph_objs.Histogram are with capital letter, but is displayed with lowercase and a 'module' instead of 'function'.

I am not sure if there is an error in the way I have installed stuff, or it it is spyder and/or the plotly library itself.

Screenshot of the code-completion issue

Version infos:

  • Python interpreter version: 3.10.1

  • Plotly library version: 5.5.0

  • Spyder version: 5.2.1 None

  • Python version: 3.7.9 64-bit

  • Qt version: 5.12.10

  • PyQt5 version: 5.12.3

  • Operating System: Windows 10


Solution

  • Just pasting in one of the comments as answer; (Spyder maintainer here) Sometimes Spyder is unable to show all completions for certain packages. That's sort of normal in Python and we can't fix it, sorry. – Carlos Cordoba Jan 19 at 4:45

    I have also tested the same plotly.graph_objs.Histogramfunction with autocomplete in MS Visual Code, and Atom. And, it does not work there either.