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

Upgrade SDK version to 6.73.138 and handle workflow errors #14

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "app",
"categories": ["system"],
"description": "Adds project from ecosystem, works with all project types: images / videos / 3d / dicom",
"docker_image": "supervisely/system:6.73.123",
"docker_image": "supervisely/system:6.73.138",
"main_script": "src/add_project.py",
"modal_template": "src/modal.html",
"modal_template_state": {
Expand Down
2 changes: 1 addition & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
supervisely==6.73.123
supervisely==6.73.138
9 changes: 8 additions & 1 deletion src/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
def check_compatibility(func):
def wrapper(self, *args, **kwargs):
if self.is_compatible is None:
self.is_compatible = self.check_instance_ver_compatibility()
try:
self.is_compatible = self.check_instance_ver_compatibility()
except Exception as e:
sly.logger.error(
"Can not check compatibility with Supervisely instance. "
f"Workflow features will be disabled. Error: {repr(e)}"
)
self.is_compatible = False
if not self.is_compatible:
return
return func(self, *args, **kwargs)
Expand Down