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
plotly 3.0 causes warnings #119
Comments
Hello, A quick search into the cufflinks repo yield only two files:
I'm working on a quick PR. |
Haven't looked into detail, but there might be more fixes required, getting this after a df.iplot():
|
Just to give more feedback: |
I've had similar issues too with plotly 3.0.0 and cufflinks (when I do import cufflinks it throws an error related to XAxis) |
@ah- you might be right After replacing by the go.layout.XAxis and go.layout.YAxis and testing the errors are due to color naming. Usually cufflinks.tools will convert to RGBA/hex string using the to_rgba function, but since it imports THEMES first, it passes the YAxis/XAxis with invalid colors. A clunky fix would to convert all the colors in THEMES to its hex string equivalent, but I still don't really know why there is suddenly this problem with colors... 🤔 |
I think it's a new feature, read about it in https://medium.com/@plotlygraphs/introducing-plotly-py-3-0-0-7bb1333f69c6, see "Deep Validation and Helpful Error Messages". |
Same ValueError, cufflinks (<=git:master) not usable with plotly 3.0+ |
Hello everyone, I think that this change causes cufflinks not work with plotly 3.0.0: https://github.com/plotly/plotly.py/blob/master/migration-guide.md#object-array-classes-deprecated |
my quick fix was to downgrade to plotly 2.0.0 for the time being
|
@DiegoAgher , Plotly==2.7.0 is working just fine since Plotly uses the Semantic Versioning 🙂 (and I tested it) |
Looking a little closer, this is going to be a fairly painful migration. |
getting started on #122 |
Yikes. This looks like a painful one. Thank you @timkpaine. Let’s get on it. |
Uninstall version 3.0 and install version 2.7.0. Worked for me. |
Hi all, I just came across this thread. Let me know if you have any questions about migration. Also, one option that may (or may not) be easier for you would be to replace all of the former graph objects (go.Scatter, etc.) with raw dictionaries\lists and then only build a |
This warning seems to have been resolved in Plotly 3.1.0. Try upgrading to this version and verify. |
Unfortunately, cufflinks 0.13.0 with Plotly 3.1.1 throws the same error:
and then the following code errors out on the bgcolor:
|
I'm having the same issue, although I also get the following error following the warnings when I import cufflinks:
|
I've created a plotly3 branch to start testing all the fixes (lot of changes). |
Done. |
Hi All, did this issues solved? I updated the latest plotly and got the same error again. What should I do? Tim |
I am also on latest plotly and it works fine. Can you send a repro and info about your environment (python and plotly/cufflinks versions) |
Sorry I forget to post the errors which is as follows: c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\graph_objs_scattergeo.py in init(self, arg, connectgaps, customdata, customdatasrc, fill, fillcolor, geo, hoverinfo, hoverinfosrc, hoverlabel, hovertext, hovertextsrc, ids, idssrc, lat, latsrc, legendgroup, line, locationmode, locations, locationssrc, lon, lonsrc, marker, mode, name, opacity, selected, selectedpoints, showlegend, stream, text, textfont, textposition, textpositionsrc, textsrc, uid, unselected, visible, **kwargs) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\basedatatypes.py in setattr(self, prop, value) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\graph_objs_scattergeo.py in marker(self, val) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\basedatatypes.py in setitem(self, prop, value) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\basedatatypes.py in _set_compound_prop(self, prop, val) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages_plotly_utils\basevalidators.py in validate_coerce(self, v) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\graph_objs\scattergeo_marker.py in init(self, arg, autocolorscale, cauto, cmax, cmin, color, colorbar, colorscale, colorsrc, gradient, line, opacity, opacitysrc, reversescale, showscale, size, sizemin, sizemode, sizeref, sizesrc, symbol, symbolsrc, **kwargs) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\basedatatypes.py in setattr(self, prop, value) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\graph_objs\scattergeo_marker.py in color(self, val) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\basedatatypes.py in setitem(self, prop, value) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages\plotly\basedatatypes.py in _set_prop(self, prop, val) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages_plotly_utils\basevalidators.py in validate_coerce(self, v, should_raise) c:\users\leirhyh\appdata\local\programs\python\python37-32\lib\site-packages_plotly_utils\basevalidators.py in raise_invalid_val(self, v) ValueError:
|
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32 import cufflinks |
Thanks and I appreciate your time. |
can you send a repro, like what are you executing |
I get the same error with the same versions as @timkpaine . Error : O/S : Ubuntu 18.04 Repro (taken from the online example:) Many thanks & appreciate your great efforts. Andy |
ah, 0.14 isn't on pypi yet. 0.13 doesn't support plotly3. |
my code is ad following: plotly.offline.init_notebook_mode() import pandas as pd coords = coords.sample(frac=0.1, replace=True) for i in range(6,10)[::-1]: cases[0]['mode'] = 'markers' layout = go.Layout(
) fig = go.Figure(layout=layout, data=cases) |
@leirhyh72 please install 0.14 |
when I use pip install, it is 0.14, do I need to install from the source?? |
I mean 0.13, sorry |
0.14 isn't disted to pypi yet: |
Hi Tim, C:\Users\leirhyh>python
plotly.graph_objs.YAxis is deprecated.
C:\Users\leirhyh\AppData\Local\Programs\Python\Python37-32\lib\site-packages\plotly\graph_objs_deprecations.py:531: DeprecationWarning: plotly.graph_objs.XAxis is deprecated.
My system is windows 10 Can you give me some suggestions? Thanks |
Thanks @timkpaine : installing cufflinks 0.14 from git did the trick, it works fine for me. |
Do I need to uninstall the 0.13 and try to install from source? Thanks |
read above |
I did use "pip install git+git://github.com/santosjorge/cufflinks.git#egg=cufflinks" |
did it actually install? if you have an install you probably need -U |
Hi Tim, after I add -U, 0.14 was successfully installed. However, the same error appeared. Don't know why. Any input? Thanks, Tim |
@leirhyh72 Are you using cufflinks within an iPython session or a Jupyter Notebook? You may need to restart your kernel to get it to work. I continued having the same error as you after install until I restarted my Jupyter notebook kernel. |
Upgrading to 0.14.0 with I have struggled with this for the last couple of week. Thank you so much guys import plotly import cufflinks |
I can confirm that this is now working properly for me with Plotly 3.2.1 and cufflinks 0.14.4. Thanks for all the hard work @santosjorge! Not to bug you too much about it, but do you have plans to push this to PyPi soon? |
@DavidJBianco when did you check for cufflinks 0.14.4? |
Sorry, you're correct. I had it installed from conda-forge, which isn't up-to-date. Switching to the PyPi version was pretty simple. |
Can confirm this error still is thrown under Plotly version 3.9.0 and cufflinks version 0.15. How do we resolve this? (aside from downgrading from Plotly 3.9.0) |
@cpoptic are you certain you're running 0.15? I was running 0.13 when I hit it and upgrading certainly solved it for me.. |
Same error with plotly 3.9, but downgrading it to 3.7 does help. |
3.9 with 0.13 was problematic for me. Upgrading cufflinks to 0.15 fixed the issue. FYI, the latest version on Conda is 0.13. |
At the moment there is no official Conda repo. I think someone created one but not sure if it is being kept up to date. Better to always use PyPi. |
When using the plotly 3.0, the below warnings show up after importing cufflinks.
Would be good to update the code by avoiding the deprecated methods.
The text was updated successfully, but these errors were encountered: