Skip to content

Commit 6f7e746

Browse files
authored
Release 0.8.6a1 (#310)
* fix: handle plugin failures in auto translation decorators for Solver plugin base class (#309) * Increment Version to 0.8.6a1 * Update Changelog --------- Co-authored-by: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Co-authored-by: JarbasAl <JarbasAl@users.noreply.github.com>
2 parents e8e1951 + d986e77 commit 6f7e746

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Changelog
22

3-
## [0.8.5a1](https://github.com/OpenVoiceOS/ovos-plugin-manager/tree/0.8.5a1) (2025-03-27)
3+
## [0.8.6a1](https://github.com/OpenVoiceOS/ovos-plugin-manager/tree/0.8.6a1) (2025-03-27)
44

5-
[Full Changelog](https://github.com/OpenVoiceOS/ovos-plugin-manager/compare/0.8.4...0.8.5a1)
5+
[Full Changelog](https://github.com/OpenVoiceOS/ovos-plugin-manager/compare/0.8.5...0.8.6a1)
66

77
**Merged pull requests:**
88

9-
- fix:solver base class init [\#307](https://github.com/OpenVoiceOS/ovos-plugin-manager/pull/307) ([JarbasAl](https://github.com/JarbasAl))
9+
- fix: handle plugin failures in auto translation decorators for Solver… [\#309](https://github.com/OpenVoiceOS/ovos-plugin-manager/pull/309) ([JarbasAl](https://github.com/JarbasAl))
1010

1111

1212

ovos_plugin_manager/templates/solvers.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,12 @@ def func_wrapper(*args, **kwargs):
8585
for k in text_keys:
8686
v = kwargs.get(k)
8787
if isinstance(v, str):
88-
lang = solver.detect_language(v)
89-
LOG.debug(f"detected 'lang': {lang} in key: '{k}' for func: {func}")
88+
try:
89+
lang = solver.detect_language(v)
90+
LOG.debug(f"detected 'lang': {lang} in key: '{k}' for func: {func}")
91+
except Exception as e:
92+
LOG.error(f"failed to detect 'lang': {e}")
93+
continue
9094
break
9195
else:
9296
for idx, v in enumerate(args):
@@ -719,8 +723,13 @@ def _do_tx(solver, data: Any, source_lang: str, target_lang: str) -> Any:
719723
Any: The translated data in the same structure as the input data.
720724
"""
721725
if isinstance(data, str):
722-
return solver.translate(data,
723-
source_lang=source_lang, target_lang=target_lang)
726+
try:
727+
return solver.translate(data,
728+
source_lang=source_lang, target_lang=target_lang)
729+
except Exception as e:
730+
LOG.error(f"Failed to translate '{data}' - ({e})")
731+
return data
732+
724733
elif isinstance(data, list):
725734
for idx, e in enumerate(data):
726735
data[idx] = _do_tx(solver, e, source_lang=source_lang, target_lang=target_lang)

ovos_plugin_manager/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# START_VERSION_BLOCK
22
VERSION_MAJOR = 0
33
VERSION_MINOR = 8
4-
VERSION_BUILD = 5
5-
VERSION_ALPHA = 0
4+
VERSION_BUILD = 6
5+
VERSION_ALPHA = 1
66
# END_VERSION_BLOCK

0 commit comments

Comments
 (0)