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

Save paths in least_cost_paths_cli and least_cost_xmission_cli not working #175

Closed
WilliamsTravis opened this issue Feb 23, 2023 · 1 comment · Fixed by #181
Closed

Save paths in least_cost_paths_cli and least_cost_xmission_cli not working #175

WilliamsTravis opened this issue Feb 23, 2023 · 1 comment · Fixed by #181
Assignees
Labels
bug Something isn't working

Comments

@WilliamsTravis
Copy link
Collaborator

Bug Description
When running the least cost path cli with save_paths=True, the .to_file method fails because the output is not converted to a geodataframe first. At this line here, the pandas concat method is creating a pandas data frame.

Traceback

Traceback (most recent call last):
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_repos/reVX/reVX/least_cost_xmission/least_cost_paths_cli.py", line 386, in <module>
    main(obj={})
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_repos/reVX/reVX/least_cost_xmission/least_cost_paths_cli.py", line 227, in local
    least_costs.to_file(fpath_out, driver="GPKG", index=False)
  File "/lustre/eaglefs/shared-projects/rev/modulefiles/alternate_envs/devruns/lib/python3.9/site-packages/pandas/core/generic.py", line 5902, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'to_file'
@WilliamsTravis WilliamsTravis added the bug Something isn't working label Feb 23, 2023
@ppinchuk
Copy link
Collaborator

Should have some time to dig into this during the next transmission routing upgrade coming up soon

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants