Script error json stack traceback: - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Script error json stack traceback: (/showthread.php?tid=1329) |
Script error json stack traceback: - Domoticatorino - 05.04.2018 Hi there, I use Always this script for weather condition Code: require('json') Resident script:14: attempt to index global 'json' (a boolean value) stack traceback: What does it mean? Thanks. RE: Script error json stack traceback: - admin - 05.04.2018 There might be an issue in either common function library or a user library with automatic load enabled. Go to Scripting - Tools - Print and search for lines like "json =" or "json=" RE: Script error json stack traceback: - Domoticatorino - 05.04.2018 Thanks, I found it but even if I delated it, problem has been not sort it out. Furthermore I have another problem in visualisation mode with this LM. When I push the icon button, telegram is sent to the bus but status object is not update hence button send always ON or OFF. It depends the status which I sent by KNX debug. This is the first time that I find this kind of problem. Ok, I sort it out the problem about object status disabling the bus sniffer. But json problem still goes on. RE: Script error json stack traceback: - admin - 05.04.2018 Try restarting the script via disable/enable RE: Script error json stack traceback: - Domoticatorino - 05.04.2018 Hi Admin, ok, I did what you suggested and everything is fine now. Thanks. But what was the problem exactly? I checked system of other my customer and I found that in HL Schneider firmware 2.0.1 the problem has been not sort it out. Error message is always the same and alarm is "('Weather: cannot fetch data'). In fact all data are very hold. How can I manage this kind of problem? Thanks. RE: Script error json stack traceback: - admin - 06.04.2018 It's an issue with your scripts/libraries. In Lua every variable is global unless prefixed with "local". If you override json global in any script library you cannot use it anywhere else. Another solution is to require library like this: Code: local json = require('json') As for weather forecast not loading, check that you have valid gateway and dns settings in network config. RE: Script error json stack traceback: - Domoticatorino - 06.04.2018 Thank you Admin. Sort it out. I used local json = require ('json'). Thank you for your support. |