Issue with python-requests

Syntax seems to be ok, now I have different error

2021-07-29 13:27:19,442 [20] [cmk.base.notify]      Output: Traceback (most recent call last):
2021-07-29 13:27:19,442 [20] [cmk.base.notify]      Output:   File "/omd/sites/cmk/local/share/check_mk/notifications/sr_servicenow_plugin", line 292, in <module>
2021-07-29 13:27:19,442 [20] [cmk.base.notify]      Output:     Plugin().notify()
2021-07-29 13:27:19,442 [20] [cmk.base.notify]      Output:   File "/omd/sites/cmk/local/share/check_mk/notifications/sr_servicenow_plugin", line 288, in notify
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:     self.__parse__()
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:   File "/omd/sites/cmk/local/share/check_mk/notifications/sr_servicenow_plugin", line 279, in __parse__
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:     self.data = self.__parse_rulebased__() # data is dict
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:   File "/omd/sites/cmk/local/share/check_mk/notifications/sr_servicenow_plugin", line 247, in __parse_rulebased__
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:     context = dict([
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:   File "/omd/sites/cmk/local/share/check_mk/notifications/sr_servicenow_plugin", line 248, in <listcomp>
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output:     (var[7:], value.decode('utf-8'))
2021-07-29 13:27:19,443 [20] [cmk.base.notify]      Output: AttributeError: 'str' object has no attribute 'decode'

It’s for this part of code:

        self.logger.debug("Parsing rulebased data from env variables")
        context = dict([
            (var[7:], value.decode('utf-8'))
            for (var, value) in os.environ.items()
            if var.startswith("NOTIFY_")])

I’m not sure if I can share the full script.