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

IndexError: index 0 is out of bounds for axis 0 with size 0 #38

Closed
ghost opened this issue Jul 1, 2017 · 6 comments
Closed

IndexError: index 0 is out of bounds for axis 0 with size 0 #38

ghost opened this issue Jul 1, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 1, 2017

Hi
try to run python src/scripts/generate_scenarios.py --schema-path data/schema.json --scenarios-path data/scenarios.json --num-scenarios 500 --random-attributes --random-items --alphas 0.3 1 3

I had error:
Traceback (most recent call last):
File "src/scripts/generate_scenarios.py", line 158, in
s = generate_scenario(schema)
File "src/scripts/generate_scenarios.py", line 93, in generate_scenario
index = random_multinomial(distrib)
File "/home/ ... /cocoa/src/basic/util.py", line 11, in random_multinomial
accum += probs[i]
IndexError: index 0 is out of bounds for axis 0 with size 0

@hhexiy
Copy link
Collaborator

hhexiy commented Jul 1, 2017

Hi,

What is the schema file you were using? I'm able to run the command successfully with data/friends-schema.json.

@SeekPoint
Copy link

SeekPoint commented Aug 15, 2017

I got the same error with:

python src/scripts/generate_scenarios.py --schema-path data/schema.json --scenarios-path data/scenarios.json --num-scenarios 500 --random-attributes --random-items --alphas 0.3 1 3

but data/friends-schema.json is OK

@hhexiy
Copy link
Collaborator

hhexiy commented Aug 15, 2017

@lovejasmine are you on the master branch? We've removed data/schema.json some time ago; it's outdated.

@SeekPoint
Copy link

I had update the code, got the same error on

python src/scripts/generate_scenarios.py --schema-path data/schema.json --scenarios-path data/scenarios.json --num-scenarios 500 --random-attributes --random-items --alphas 0.3 1 3

@hhexiy
Copy link
Collaborator

hhexiy commented Aug 16, 2017

Can you use but data/friends-schema.json? data/schema.json should not be used.

@SeekPoint
Copy link

@hhexiy , that works

@hhexiy hhexiy closed this as completed Aug 30, 2017
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