title: Snap7 python - Cannot change this param now
body: <p>Im trying to connect to plc using snap7 with python , previously the code works fine but now when i try to run shows me an error b'CLI : Cannot change this param now'i try to run this on diferent version of python also i reinstall snap7 library now i try to run with python-snap7 1.1 library and the snap7 version its 1.4.</p>
  <pre><code>import snap7.client as c
  from snap7.util import *
  from snap7.types import *
  
  
  class Comms():
      &quot;&quot;&quot;Controller PLC Comms &quot;&quot;&quot;
  
      def __init__(self, ip_addr, rack, slot):
          &quot;&quot;&quot;Initialize connection attributes.&quot;&quot;&quot;
          self.plc = c.Client()
          self.ip_addr = ip_addr
          self.rack = rack
          self.slot = slot
  
      def connect(self):
          &quot;&quot;&quot;Establish connection to PLC &quot;&quot;&quot;
          try:
              self.plc.connect(self.ip_addr, self.rack, self.slot)
              message = &quot;Connection Successfull!!!!&quot;
              status = 1
  
          except:
              message = &quot;Connection Failed - Unreachable peer, check plc setup and connection&quot;
              status = 2
          return status
  
      def ReadMemory(self, area, index, start, lenght):
          &quot;&quot;&quot;Read Memory Area &quot;&quot;&quot;
          try:
              self.data = self.plc.read_area(areas[area], index, start, lenght)
              bytes = []
              for self.data in self.data:
                  bytes.append(self.data)
              return bytes
  
          except:
              message = 'Failed to read Data'
              return message
  
      def ReadBool(self, byte_index, bool_index):
          '''Read bool from array'''
          try:
              boolVal = get_bool(self.data, byte_index, bool_index)
              print(boolVal)
              return boolVal
  
          except:
              pass
  
  
  
  if __name__ == &quot;__main__&quot;:
      plc = Comms('192.168.1.10', 0, 1)
      plc.connect()
      print(plc.connect())
  </code></pre>