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

TypeError: 'module' object is not callable #21

Closed
ahorvath opened this issue Nov 14, 2018 · 2 comments
Closed

TypeError: 'module' object is not callable #21

ahorvath opened this issue Nov 14, 2018 · 2 comments

Comments

@ahorvath
Copy link

Can you help me, please?

Trying to run one the examples I got this error:

import pandas as pd
from pySankey import sankey

df = pd.read_csv(
... 'goods.csv', sep=',',
... names=['id', 'customer', 'good', 'revenue']
... )

df
id customer good revenue
0 0 John fruit 5.5
1 1 Mike meat 11.0
2 2 Betty drinks 7.0
3 3 Ben fruit 4.0
4 4 Betty bread 2.0
5 5 John bread 2.5
6 6 John drinks 8.0
7 7 Ben bread 2.0
8 8 Mike bread 3.5
9 9 John meat 13.0

sankey(left=df['customer'], right=df['good'], rightWeight=df['revenue'], aspect=20,fontsize=20, figureName="customer-good")
Traceback (most recent call last):
File "", line 1, in
TypeError: 'module' object is not callable

@Pierre-Sassoulas
Copy link
Contributor

Probably a bad import caused by #18 . Temporary fix :

from pySankey.sankey import sankey

@ahorvath
Copy link
Author

Thanks! It works with another quick fix: figureName -> figure_name

Bests,
Attila

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

2 participants