Hi everyone. I'm trying to read and set some outputs and some variables in a very simple program using Python. I've already configured my DBs with the GET/PUT and the optimized block access option according to the manual, but no matter what I try my program always returns something like the lines that follows:

File "C:\Users\xxxxxxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\snap7\client.py", line 145, in db_read
    check_error(result, context="client")
  File "C:\Users\xxxxxxx\AppData\Local\Programs\Python\Python37-32\lib\site-packages\snap7\common.py", line 65, in check_error
    raise Snap7Exception(error)
snap7.snap7exceptions.Snap7Exception: b'CLI : function refused by CPU (Unknown error)'

Of course, I'm able to connect to the PLC because the function to check the connection returns True, but apart from that I'm complitely out of ideas. Any suggestions?

Thanks