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

UnicodeDecodeError issue #374

Open
ruslanolkhovsky opened this issue Apr 1, 2021 · 1 comment
Open

UnicodeDecodeError issue #374

ruslanolkhovsky opened this issue Apr 1, 2021 · 1 comment

Comments

@ruslanolkhovsky
Copy link

ruslanolkhovsky commented Apr 1, 2021

Hello,

we are using the durable rules in our project as a workflow engine, mostly as a flow ruleset. it works fine, but sometimes we get the following error:

Error dispatching ruleset
Traceback (most recent call last):
  File "/.../.local/lib/python3.8/site-packages/durable/engine.py", line 925, in dispatch_ruleset
    ruleset.dispatch()
  File "/.../.local/lib/python3.8/site-packages/durable/engine.py", line 509, in dispatch
    result = durable_rules_engine.start_action(self._handle)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 9: invalid start byte
...

Error dispatching ruleset
Traceback (most recent call last):
  File "/.../.local/lib/python3.8/site-packages/durable/engine.py", line 925, in dispatch_ruleset
    ruleset.dispatch()
  File "/.../.local/lib/python3.8/site-packages/durable/engine.py", line 509, in dispatch
    result = durable_rules_engine.start_action(self._handle)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 9: invalid start byte

We check and prepare the ruleset to be a valid json/string, which works just fine. But, apparently, sometimes it does not :)
Also, we never experienced this error while running it on a mac host, it happens in a docker container with ubuntu.

Any advice is very welcome. Or maybe you could add an extra validation / fix in the engine.py (509) or in the pyStartAction (rules.c) to eliminate the problematic bytes? Please, help.

Thank you!
Ruslan

@ruslanolkhovsky
Copy link
Author

ruslanolkhovsky commented Apr 9, 2021

Interesting finding... Apparently, allocating more memory makes this issue disappear. Are there any minimal/recommended memory/cpu/other requirements for the library? I am considering an option of running it on Raspbery Pi and other low capacity platforms. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant