Attributeerror: module 'plotly.validators.layout.template.data' has no attribute 'Isosurfacesvalidator'

Asked

Viewed 190 times

1

I have an interactive graph in python. The code below works in Azure Notebook, but I had to migrate my code to Jupyterlab and it shows the following error:

Attributeerror: module 'plotly.validators.layout.template.data' has no attribute 'Isosurfacesvalidator'

Follows the code.

import pandas as pd
import plotly.plotly as py
import plotly.offline as py
import plotly.graph_objs as go
py.init_notebook_mode(connected=True)

trace = go.Bar(x = problema.index,
               y = problema)
data = [trace]

layout = go.Layout(title='Ranking de Problema',
                   yaxis={'title':'Quantidade'},
                   xaxis={'title': 'Problema'})


fig = go.Figure(data=data, layout=layout)
py.iplot(fig)
  • I never used Jyperlab. What would it be? It has documentation of it?

  • 1

    I didn’t know Azure had an online service for this. I’ve already registered and I’m using it. What a mass!

  • Yes, you do. I’m Following the Link: https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html Azure does!!! and it’s excellent. It’s possible to access your code from anywhere. I love it in it!

  • Ahhh. It’s Jupyterlab. You wrote Jyper, so I couldn’t find it when I Googled it. It’s the newest version of Jupyternotebook.

  • So, is the Python version the same one you used in Azure? Otherwise, which line gives this error?

  • 1

    hahaaha corrected! Thank you!! ^^"

  • In the upper right corner of the document you can see the Python version to run this notebook.

  • 1

    How do I see this? Note: I have just started learning how to program and am starting with python! ^^"

  • In Jupyterlab I think it is version 3.7.2.

  • Got it. So, I believe the library ploty is not installed in your project. By the terminal or CMD log in to your project folder and type: pip install ploty. But for this you need to have Python installed on the PC and also the pip for installation of dependencies.

  • Another question, is your code whole in question? Why did I turn here and see that problema there is no.

  • through Ananconda’s CMD I can do that??

  • Yeah, it’s to get.

  • did this and gave the error below: Collecting ploty Could not find a version that satisfies the requirement ploty (from versions: ) No matching Distribution found for ploty

  • 1

    For those who do not know have also the colab has even GPU free. I tried to run there, but the problem was the problema that is not in the code. :-)

  • How nice of Sidon!!

  • Thank you very much, good to know!!! = D

Show 12 more comments

1 answer

1


I discovered I was making this mistake for a simple reason. I had to have Node.Js installed on my machine in order to run this code on Anaconda / Jupyterlab.

Step 1: I downloaded Node.Js through the site: https://nodejs.org/en/ and installed the same.

Step 2: Opened the CMD of Jupyterlab and installed the plotly extension, through the following code:

jupyter labextension install @jupyterlab/plotly-extension

3° Step 3: Run the code that was displaying the error below again

module 'plotly.validators.layout.template.data' has no attribute 'Isosurfacesvalidator'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.