Skip to content

Commit

Permalink
Upgrade SDK version and handle workflow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenAnpu committed Jul 23, 2024
1 parent 00ac3de commit 10062bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
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

0 comments on commit 10062bf

Please sign in to comment.