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

Scenario: Unicode issue on Scenario name #526

Open
axboct opened this issue Jul 26, 2017 · 0 comments
Open

Scenario: Unicode issue on Scenario name #526

axboct opened this issue Jul 26, 2017 · 0 comments

Comments

@axboct
Copy link

axboct commented Jul 26, 2017

Name of scenario " Тест "

2017-07-26 18:57:35,553 domogik-scenario INFO Scenario 2 deleted
2017-07-26 18:57:35,554 domogik-scenario INFO Create or save scenario : name = '2', id = '2', json = '{"type":"controls_if","id":"CXeRaH*|O;%(XRY0~0(d","IF0":{"type":"logic_compare","id":"z#!~|7.zGj?F6],$2/*|","OP":"NEQ","A":{"type":"sensor.SensorTest.48","id":"cT|?[c-Wn]OiD.QKD6.]","usage.usage":"value"},"B":{"type":"DT_mbarPressure","id":"|]b^_rYLzX8a;z,[ymaL","NUM":"1000"}},"DO0":{"type":"butler.ButlerAction","id":"~P3[Ni50s?-%$+Rv:#}}","text":{"type":"text","id":"t[}^sj87,RQMt(21lH(a","TEXT":"Привет от Domogik"}}}'
2017-07-26 18:57:35,687 domogik-scenario.Тест DEBUG Create test instance sensor.SensorTest.48 with uuid 466e65b3-489c-49d6-95d9-194445506379
2017-07-26 18:57:35,855 domogik-scenario.Тест DEBUG Trigger <bound method ScenarioInstance.generic_trigger of <domogik.scenario.scenario.ScenarioInstance instance at 0x7f959c0c5248>> called by parameter <domogik.scenario.parameters.sensor_usage.SensorUsageParameter instance at 0x7f959c080998>
2017-07-26 18:57:35,855 domogik-scenario.Тест DEBUG Create action instance butler.ButlerAction with uuid 9a34dbc2-3f88-4839-8701-db1e6932f832
2017-07-26 18:57:35,855 domogik-scenario.Тест DEBUG Eval the condition!
2017-07-26 18:57:35,868 domogik-scenario.Тест INFO Scenario 'Тест' : configure the trigger to the last item of each test instance
2017-07-26 18:57:35,868 domogik-scenario.Тест DEBUG Scenario 'Тест' : test instance : sensor.SensorTest.48 (1 items)
2017-07-26 18:57:35,868 domogik-scenario.Тест DEBUG Set trigger for item '0' to generic_trigger
2017-07-26 18:57:35,868 domogik-scenario.Тест DEBUG Scenario 'Тест' python generated code : 
print('---- Start evaluating ----')
if ( self._mapping['test']['466e65b3-489c-49d6-95d9-194445506379'].evaluate() != float("1000") ):
    self._mapping['action']['0-9a34dbc2-3f88-4839-8701-db1e6932f832'].set_param("text", ("Привет от Domogik"))
    self._mapping['action']['0-9a34dbc2-3f88-4839-8701-db1e6932f832'].do_action()

2017-07-26 18:57:35,869 domogik-scenario ERROR Creation of a scenario failed. Error is : Traceback (most recent call last):
  File "/home/sasa/domogik/src/domogik/scenario/manager.py", line 235, in create_scenario
    scen = ScenarioInstance(self.log, cid, name, payload, dis, state, self._db)
  File "/home/sasa/domogik/src/domogik/scenario/scenario.py", line 132, in __init__
    self._instanciate()
  File "/home/sasa/domogik/src/domogik/scenario/scenario.py", line 212, in _instanciate
    self._compiled_condition = compile(tmp, u"Scenario {0}".format(buf), 'exec')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-12: ordinal not in range(128)
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