rules icon indicating copy to clipboard operation
rules copied to clipboard

UnicodeDecodeError issue

Open ruslanolkhovsky opened this issue 4 years ago • 1 comments

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 avatar Apr 01 '21 12:04 ruslanolkhovsky

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.

ruslanolkhovsky avatar Apr 09 '21 07:04 ruslanolkhovsky