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

Cannot generate data with provided default settings #42

Open
YonetaroKawada opened this issue Jan 23, 2021 · 5 comments
Open

Cannot generate data with provided default settings #42

YonetaroKawada opened this issue Jan 23, 2021 · 5 comments

Comments

@YonetaroKawada
Copy link

I got the below error when I tried to execute without modification of the downloaded settings.

AMLSim-master>python scripts\transaction_graph_generator.py conf.json
INFO:main:Random seed: 0
INFO:main:Simulation name: sample
INFO:main:Generated 1000 accounts.
INFO:main:Add 9900 base transactions
Traceback (most recent call last):
File "scripts\transaction_graph_generator.py", line 1154, in
txg.generate_normal_transactions() # Load a parameter CSV file for the base transaction types
File "scripts\transaction_graph_generator.py", line 536, in generate_normal_transactions
self.add_transaction(src, dst) # Add edges to transaction graph
File "scripts\transaction_graph_generator.py", line 580, in add_transaction
self.check_account_exist(orig) # Ensure the originator and beneficiary accounts exist
File "scripts\transaction_graph_generator.py", line 314, in check_account_exist
raise KeyError("Account %s does not exist" % str(aid))
KeyError: "Account {'label': 'account', 'init_balance': 92221.09257625241, 'start': -1, 'end': -1, 'country': 'US', 'business': 'I', 'is_sar': False, 'model_id': 1, 'bank_id': 'bank'} does not exist"

@KirtiRasal
Copy link

Hi @YonetaroKawada ,

I was curious if you were able to solve this issue, even I am facing the same issue. Please let me know if you are able to resolve this issue.

Thanks in advance.

@wangxiaoyunNV
Copy link

wangxiaoyunNV commented Jun 24, 2021

I have the same problem.
I fixed this by installing powerlaw package.
pip3 install powerlaw

@FluxB
Copy link

FluxB commented Jun 30, 2021

I believe this problem occurs if you use more recent versions of networkx . If you use 1.11 as they suggest, it works.
Try running:
pip3 install networkx==1.11

@italodellagarza
Copy link

@FluxB I'm having the same problem here. When I change the networkx to 2.5, I have the error "ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.9/fractions.py)"

@YannickRuppenthal
Copy link

Old versions of networkx are not compatible with newer python versions.
It seemed to work when changing the import from from fractions import gcd to from math import gcd in the file with the problems

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

6 participants