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

Syntax error in sankey.py #23

Open
dsvancer opened this issue Jan 16, 2019 · 9 comments
Open

Syntax error in sankey.py #23

dsvancer opened this issue Jan 16, 2019 · 9 comments

Comments

@dsvancer
Copy link

Currently line 34 of sankey.py in the pySankey package is - if len(labels > 0):
When the leftLabels or rightLabels arguments are provided to the sankey function, this generates an error.
Line 34 should be updated to if len(labels) > 0:

@Pierre-Sassoulas
Copy link
Contributor

Fixed in pySankeyBeta, you can install it with :

pip install pySankeyBeta

@brianpenghe
Copy link

Fixed in pySankeyBeta, you can install it with :

pip install pySankeyBeta

Can you put this command in README ?

@Pierre-Sassoulas
Copy link
Contributor

@brianpenghe No, if I could merge, I would merge the correction directly ;)

@kenosborne
Copy link

Well, if the pySankeyBeta is based on the github webpage
https://github.com/anazalea/pySankey/blob/master/pysankey/sankey.py
then the error is still there (on line 42).

I haven't tried the pysankey beta, but am going to try to modify my local copy of the library to see if I can't get the functionality I'm looking for.

@Pierre-Sassoulas
Copy link
Contributor

@kenosborne, PySankeyBeta is based on https://github.com/Pierre-Sassoulas/pySankey/tree/master. I'll be able to merge your pull request and release another version if you need.

@brianpenghe
Copy link

@kenosborne, PySankeyBeta is based on https://github.com/Pierre-Sassoulas/pySankey/tree/master. I'll be able to merge your pull request and release another version if you need.

I've installed the pySankeyBeta but the error is still there

@Pierre-Sassoulas
Copy link
Contributor

Pierre-Sassoulas commented Jun 30, 2019

It might still import the old one. Did you uninstall PySankey ? I'm not going to test this, but if I remember correctly, PySankeyBeta need, from pysankey import sankey while you probably had from pysankey.sankey import sankey.

Do pip3 uninstall PySankey and you should have an understandable error.

@brianpenghe
Copy link

brianpenghe commented Jun 30, 2019

pip3 uninstall PySankey

Yes I uninstalled PySankey. But when I reinstall pySankeyBeta again, it creates two folders under /usr/local/lib/python3.6/dist-packages/ : one for pySankeyBeta with no .py files in it, and one for pysankey with the older version. And when I do from pysankey import sankey it imports the version that the error's still there

@Pierre-Sassoulas
Copy link
Contributor

pySankeyBeta should be in a non-empty directory called pysankey containing a sub-directory called tests (previously it was a pySankey directory with only __init__.py and sankey.py in it).

Can you also try pip3 install -U pySankeyBeta to make sure you have the latest version?

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

No branches or pull requests

4 participants