Skip to content
Snippets Groups Projects
Commit c2f47ffd authored by Samuel GAIST's avatar Samuel GAIST
Browse files

Merge branch '71_fix_algorithm_prototype_loading' into 'master'

Decode algorithm prototype content if python is older than 3.6

Closes #71

See merge request !61
parents 884288e6 04157844
No related branches found
No related tags found
1 merge request!61Decode algorithm prototype content if python is older than 3.6
Pipeline #28171 passed
......@@ -49,6 +49,7 @@ Forward importing from :py:mod:`beat.backend.python.algorithm`
import os
import six
import sys
import json
import numpy
import pkg_resources
......@@ -64,9 +65,12 @@ from beat.backend.python.algorithm import Algorithm as BackendAlgorithm
def load_algorithm_prototype(prefix):
algorithm_data = json.loads(
pkg_resources.resource_string(__name__, "prototypes/algorithm.json")
)
prototype_data = pkg_resources.resource_string(__name__, "prototypes/algorithm.json")
if sys.version_info < (3, 6):
prototype_data = prototype_data.decode("utf-8")
algorithm_data = json.loads(prototype_data)
ref_dataformats = ["integer", "integers"]
dataformat = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment