Skip to content

Commit 4e8c2b9

Browse files
authored
Remove trailing slashes from webknossos_url (#1137)
* Remove trailing slashes from webknossos_url * Update changelog
1 parent ee8cb99 commit 4e8c2b9

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

webknossos/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For upgrade instructions, please check the respective _Breaking Changes_ section
2121
- Added options `--layer-name` and `--mag` for compress command of the CLI. [#1141](https://github.com/scalableminds/webknossos-libs/pull/1141)
2222

2323
### Fixed
24+
- Fixed issue with webknossos URL and context URL being considered different when opening a remote dataset due to trailing slashes. [#1137](https://github.com/scalableminds/webknossos-libs/pull/1137)
2425

2526

2627
## [0.14.26](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.14.26) - 2024-07-22

webknossos/webknossos/annotation/annotation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ def download(
316316
"[DEPRECATION] `annotation_type` is deprecated for Annotation.download(), it should be omitted.",
317317
DeprecationWarning,
318318
)
319-
319+
if webknossos_url is not None:
320+
webknossos_url = webknossos_url.rstrip("/")
320321
if webknossos_url is not None and webknossos_url != _get_context().url:
321322
warnings.warn(
322323
f"[INFO] The supplied url {webknossos_url} does not match your current context {_get_context().url}. "

webknossos/webknossos/dataset/dataset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ def _parse_remote(
436436
dataset_name = dataset_name_or_url
437437

438438
current_context = _get_context()
439+
if webknossos_url is not None:
440+
webknossos_url = webknossos_url.rstrip("/")
439441
if webknossos_url is not None and webknossos_url != current_context.url:
440442
if sharing_token is None:
441443
warnings.warn(

0 commit comments

Comments
 (0)