The Wayback Machine - https://web.archive.org/web/20200905102900/https://github.com/plotly/plotly_express/issues/10
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

Example doesn't seem to work - Uncaught ReferenceError #10

Open
dhhagan opened this issue Mar 20, 2019 · 11 comments
Open

Example doesn't seem to work - Uncaught ReferenceError #10

dhhagan opened this issue Mar 20, 2019 · 11 comments

Comments

@dhhagan
Copy link

@dhhagan dhhagan commented Mar 20, 2019

After the announcement, I had to try the new/cool thing - however, I can't seem to get the basic Iris scatter plot example to render. The console tells me it's the following:

Screen Shot 2019-03-20 at 4 00 22 PM

I am running in the jupyter/scipy-notebook docker container with a requirement for jupyter_express.

It seems like it sets/draws the window, but nothing is rendered - let me know if more information is needed.

@nicolaskruchten
Copy link
Member

@nicolaskruchten nicolaskruchten commented Mar 21, 2019

Hi, and I'm sorry you're having trouble! I can't think of anything offhand that might cause this but I'll try to replicate it. Are you able to run any of the non-express Plotly.py examples from https://plot.ly/python?

@dhhagan
Copy link
Author

@dhhagan dhhagan commented Mar 21, 2019

Nope, they don't! I tried the following:

import plotly
import plotly.graph_objs as go

plotly.offline.init_notebook_mode(connected=True)

plotly.offline.iplot({
    "data": [go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])],
    "layout": go.Layout(title="hello world")
})

It throws the same error...

@nicolaskruchten
Copy link
Member

@nicolaskruchten nicolaskruchten commented Mar 21, 2019

Hmm OK, that seems to be a deeper problem which I'll have to dig into with @jonmmease

@jonmmease
Copy link
Member

@jonmmease jonmmease commented Mar 23, 2019

Hi @dhhagan,

Just to clarify, are you trying this in the classic notebook (not jupyterlab?). I'm not familiar with the jupyter/scipy-notebook docker container but does it contain a standard Jupyter Notebook as far as you know? I ask because the error message stating "require is not defined" would be pretty surprising in a stock Jupyter Notebook, because this comes bundled with requirejs.

This kind of error does crop up when working in non-standard notebook environments like Google Colab though.

@sjnik
Copy link

@sjnik sjnik commented May 2, 2019

I'm getting a similar error using jupyterlab - window is set but nothing to rendered while it works on the classic notebook.

Screen Shot 2019-05-02 at 16 31 28

I have done everything under the instructions listed here

Would you be able to help?

@calvdee
Copy link

@calvdee calvdee commented May 16, 2019

I am experiencing the same issue on Python 3.7.3.

appdirs 1.4.3
appnope 0.1.0
asn1crypto 0.24.0
atomicwrites 1.3.0
attrs 19.1.0
automat 0.7.0
backcall 0.1.0
backports 1.0
bcrypt 3.1.6
blas 1.0
bleach 3.1.0
boto3 1.9.146
botocore 1.12.146
ca-certificates 2019.1.23
certifi 2019.3.9
cffi 1.12.3
chardet 3.0.4
click 7.0
cloudpickle 1.0.0
colorlover 0.3.0
configparser 3.7.3
constantly 15.1.0
cryptography 2.6.1
cssselect 1.0.3
cufflinks-py 0.13.0
cycler 0.10.0
databricks-cli 0.8.6
decorator 4.4.0
defusedxml 0.6.0
docker-py 3.7.2
docker-pycreds 0.4.0
docutils 0.14
entrypoints 0.3
flask 1.0.2
freetype 2.9.1
gitdb2 2.0.5
gitpython 2.1.11
gunicorn 19.9.0
hyperlink 19.0.0
icu 58.2
idna 2.8
incremental 17.5.0
intel-openmp 2019.3
ipykernel 5.1.0
ipython 7.5.0
ipython_genutils 0.2.0
itsdangerous 1.1.0
jedi 0.13.3
jinja2 2.10.1
jmespath 0.9.4
jsonschema 3.0.1
jupyter_client 5.2.4
jupyter_core 4.4.0
jupyterlab 0.35.5
jupyterlab_server 0.2.0
kiwisolver 1.1.0
libcxx 4.0.1
libcxxabi 4.0.1
libedit 3.1.20181209
libffi 3.2.1
libgfortran 3.0.1
libiconv 1.15
libpng 1.6.37
libprotobuf 3.7.1
libsodium 1.0.16
libxml2 2.9.9
libxslt 1.1.33
lxml 4.3.3
markupsafe 1.1.1
matplotlib 3.0.3
mistune 0.8.4
mkl 2019.3
mkl_fft 1.0.12
mkl_random 1.0.2
mleap 0.8.1
mlflow 0.9.0.1
more-itertools 7.0.0
nbconvert 5.5.0
nbformat 4.4.0
ncurses 6.1
nose 1.3.7
nose-exclude 0.5.0
notebook 5.7.8
numpy 1.16.3
numpy-base 1.16.3
openssl 1.1.1b
packaging 19.0
pandas 0.24.2
pandoc 2.2.3.2
pandocfilters 1.4.2
parsel 1.5.1
parso 0.4.0
patsy 0.5.1
pexpect 4.7.0
pickleshare 0.7.5
pip 19.1.1
plotly 3.8.1
pluggy 0.11.0
prometheus_client 0.6.0
prompt_toolkit 2.0.9
protobuf 3.7.1
ptyprocess 0.6.0
py 1.8.0
pyasn1 0.4.5
pyasn1-modules 0.2.4
pycparser 2.19
pydispatcher 2.0.5
pygments 2.4.0
pyhamcrest 1.9.0
pyopenssl 19.0.0
pyparsing 2.4.0
pyrsistent 0.14.11
pysocks 1.7.0
pytest 4.4.2
pytest-runner 4.4
python 3.7.3
python-dateutil 2.8.0
pytz 2019.1
pyyaml 5.1
pyzmq 18.0.0
querystring_parser 1.2.3
queuelib 1.5.0
readline 7.0
requests 2.21.0
retrying 1.3.3
s3transfer 0.2.0
scikit-learn 0.20.3
scipy 1.2.1
scrapy 1.6.0
seaborn 0.9.0
send2trash 1.5.0
service_identity 18.1.0
setuptools 41.0.1
simplejson 3.16.0
six 1.12.0
smmap2 2.0.5
sqlite 3.28.0
sqlparse 0.3.0
statsmodels 0.9.0
tabulate 0.8.3
terminado 0.8.2
testpath 0.4.2
tk 8.6.8
tornado 6.0.2
traitlets 4.3.2
twisted 19.2.0
urllib3 1.24.2
w3lib 1.20.0
wcwidth 0.1.7
webencodings 0.5.1
websocket-client 0.56.0
werkzeug 0.15.2
wheel 0.33.2
xz 5.2.4
yaml 0.1.7
zeromq 4.3.1
zlib 1.2.11
zope 1.0
zope.interface 4.6.0

@fede3u
Copy link

@fede3u fede3u commented Jun 8, 2019

Same problem

@nicolaskruchten
Copy link
Member

@nicolaskruchten nicolaskruchten commented Jun 8, 2019

And you’ve installed the jupterlab extension as suggested in the readme?

@fede3u
Copy link

@fede3u fede3u commented Jun 8, 2019

I reinstalled everything now the error is the following. The online version works the offline comes out with no data 'plot' and nothing in 'iplot'

TypeError: Cannot read property 'length' of undefined
at arrayTicks (plotly.js:118274)
at Object.calcTicks (plotly.js:118211)
at Object.axes.drawOne (plotly.js:119293)
at plotly.js:119257
at Object.lib.syncOrAsync (plotly.js:104804)
at Object.axes.draw (plotly.js:119252)
at drawAxes (plotly.js:110141)
at Object.lib.syncOrAsync (plotly.js:104804)
at Object.plot (plotly.js:110174)
at Object.newPlot (plotly.js:110444)

@nicolaskruchten
Copy link
Member

@nicolaskruchten nicolaskruchten commented Jun 8, 2019

Hmm. What does import plotly; plotly.__version__ return?

@fede3u
Copy link

@fede3u fede3u commented Jun 8, 2019

'3.10.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.