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

grass.jupyter: fix reinitializing session #3563

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

petrasovaa
Copy link
Contributor

When running gj.init(/path/to/project) in already active session, the paths got all mixed up. Problem was that mapset_exists was getting mapset="/tmp/someting/project_name" and because of a somewhat unexpected (but documented) behavior of os.path.join when merging absolute paths, this end up as an existing directory, while the expectation was it would fail. So this change adds the check that mapset is a name, not a path.

@petrasovaa petrasovaa added the bug Something isn't working label Apr 5, 2024
@petrasovaa petrasovaa self-assigned this Apr 5, 2024
@petrasovaa petrasovaa added this to the 8.4.0 milestone Apr 5, 2024
@github-actions github-actions bot added Python Related code is in Python libraries notebook labels Apr 5, 2024
Copy link
Contributor

@veroandreo veroandreo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected, great!

@echoix echoix merged commit 9f49630 into OSGeo:main Apr 6, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libraries notebook Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants