Logic Machine Forum
io.writefile call blocked - 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: io.writefile call blocked (/showthread.php?tid=4502)



io.writefile call blocked - Trond Hoyem - 16.01.2023

Hi

I try to create an emergency light test report. I am getting en error when trying to write the file to the FTP folder in SL. 

The write code is as follows: 
Code:
CSV = rapport .. table.concat(reportBuffer, '\r\n')
result, err = io.writefile ('/home/ftp/' .. reportFile, csv)

I have activated the FTP, and can even log into it with FileZilla, but I am not writing anyting to the storage right now.

Has there been any change to shis function? Do I need to add user and password to the io.writefile? If so, what would be the syntax?


RE: io.writefile call blocked - admin - 16.01.2023

Disable "Block unsafe functions in scripts" in Utilities > General configuration.


RE: io.writefile call blocked - Trond Hoyem - 16.01.2023

(16.01.2023, 09:41)admin Wrote: Disable "Block unsafe functions in scripts" in Utilities > General configuration.

Great! That did it.

I got another error now, but that is probably just something in my script, so I will check that out myself...


RE: io.writefile call blocked - equalizer - 09.05.2025

I have the io.writefile call blocked error on Wiser for KNX firmware 2.8 and 3.0, but there doesn't seem to be an option to allow this.

Is the option somewhere else or has the new firmware's really broken the .lp file types?

Robert.


RE: io.writefile call blocked - Daniel - 09.05.2025

General configuration - Block unsafe functions in scripts:


RE: io.writefile call blocked - equalizer - 09.05.2025

(09.05.2025, 11:55)Daniel Wrote: General configuration - Block unsafe functions in scripts:

I could have sworn that wasn't there a minute ago :-)