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

Release on pypi is broken #55

Closed
schuylerfried opened this issue Apr 15, 2019 · 4 comments · Fixed by #59
Closed

Release on pypi is broken #55

schuylerfried opened this issue Apr 15, 2019 · 4 comments · Fixed by #59
Labels
bug A bug or regression

Comments

@schuylerfried
Copy link

Error when trying to import module functions:

  from pygsti.construction import make_lsgst_experiment_list, std1Q_XY, std1Q_XYI, std2Q_XYCNOT
  File "/home/schuyler/.conda/envs/arb-p/lib/python3.6/site-packages/pygsti/__init__.py", line 15, in <module>
    from . import report as rpt
  File "/home/schuyler/.conda/envs/arb-p/lib/python3.6/site-packages/pygsti/report/__init__.py", line 12, in <module>
    from .factory import *
  File "/home/schuyler/.conda/envs/arb-p/lib/python3.6/site-packages/pygsti/report/factory.py", line 26, in <module>
    from . import workspace as _ws
  File "/home/schuyler/.conda/envs/arb-p/lib/python3.6/site-packages/pygsti/report/workspace.py", line 26, in <module>
    from . import plotly_plot_ex as _plotly_ex
  File "/home/schuyler/.conda/envs/arb-p/lib/python3.6/site-packages/pygsti/report/plotly_plot_ex.py", line 11, in <module>
    from plotly.offline.offline import _plot_html
ImportError: cannot import name '_plot_html'

Turns out plotly released v3.8.0 like 11 hours ago, which removed this function _plot_html_. Easy fix is to pin the plotly version in your requirements.txt and setup.py, then tag and release a new version.

@schuylerfried
Copy link
Author

schuylerfried commented Apr 16, 2019

Longer term fix would be to remove any calls to plotly functions that start with _

@enielse enielse added the bug A bug or regression label Apr 16, 2019
@enielse
Copy link
Collaborator

enielse commented Apr 16, 2019

Thanks for noting this issue - our automated tests picked this up earlier today and the pyGSTi beta branch has already been fixed to work with plotly v3.8. As you suggested, we could hotfix the master branch by simply pinning the plotly version to 3.7, which I expect we'll do soon. Let's leave this issue open until that happens.

As an aside, one good thing coming from all this is that the functionality that pyGSTi needs from plotly is now (as of v3.8) exposed through the public api (no underscore functions) -- previously we unfortunately needed to utilize the _plot_html function. So pyGSTi will be less fragile to plotly updates in the future, and more robust in general because _plot_html was the only underscore function imported in from an external package.

@enielse
Copy link
Collaborator

enielse commented Apr 18, 2019

Just for completeness, this issue is temporarily fixed by pinning the plotly version in the Version 0.9.7.3 release, which is available through PyPI/pip now as well. This pinning will be removed in future releases which will contain a more permanent fix. I believe this solves the issue raised by schuylerfried an so I'll close the this issue.

@enielse enielse reopened this Apr 18, 2019
@enielse enielse closed this as completed Apr 18, 2019
@schuylerfried
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug or regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants