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

Running Error: ValueError("Lengths must match to compare") #172

Closed
kata26rakuda opened this issue Mar 28, 2023 · 0 comments
Closed

Running Error: ValueError("Lengths must match to compare") #172

kata26rakuda opened this issue Mar 28, 2023 · 0 comments

Comments

@kata26rakuda
Copy link

kata26rakuda commented Mar 28, 2023

Hallo, Team.
I'm trying with the attached dataset to launch 'run_populationsim.py' with version 0.5.1 but it gives me the following error:


Traceback (most recent call last):
File "run_populationsim.py", line 39, in
sys.exit(run(args))
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\activitysim\cli\run.py", line 284, in run
pipeline.run(models=config.setting("models"), resume_after=resume_after)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\activitysim\core\pipeline.py", line 650, in run
run_model(model)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\activitysim\core\pipeline.py", line 502, in run_model
orca.run([step_name])
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\orca\orca.py", line 2177, in run
step()
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\orca\orca.py", line 973, in call
return self._func(**kwargs)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\populationsim\steps\meta_control_factoring.py", line 113, in meta_control_factoring
seed_level_meta_controls[target] = seed_level_meta_controls[target].round().astype(int)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\generic.py", line 6240, in astype
new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\internals\managers.py", line 448, in astype
return self.apply("astype", dtype=dtype, copy=copy, errors=errors)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\internals\managers.py", line 352, in apply
applied = getattr(b, f)(**kwargs)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\internals\blocks.py", line 526, in astype
new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\dtypes\astype.py", line 299, in astype_array_safe
new_values = astype_array(values, dtype, copy=copy)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\dtypes\astype.py", line 230, in astype_array
values = astype_nansafe(values, dtype, copy=copy)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\dtypes\astype.py", line 140, in astype_nansafe
return _astype_float_to_int_nansafe(arr, dtype, copy)
File "C:\Users\oc3490\anaconda3\envs\popsim\lib\site-packages\pandas\core\dtypes\astype.py", line 182, in _astype_float_to_int_nansafe
raise IntCastingNaNError(
pandas.errors.IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer
Closing remaining open files:output\pipeline.h5...done

My database does not have NA/Inf cell...so I do not know why this error occurs.
The initial balancing seems to be successful.

My geography setting is just two levels [TAZ, REGION] (Outside of US).
I also tried with some intermediate geographies such as PUMA and TRACT but the program generates the same error message.

I add a zip file with all my input data and settings that had produced the error.
Thank you so much for your kind assistance in advance. I really look forward some reply from the team.

Best regards

sample.zip

@kata26rakuda kata26rakuda changed the title Running Error: Cannot convert non-finite values (NA or inf) to integer Running Error: ValueError("Lengths must match to compare") Apr 5, 2023
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

1 participant