code: def _guessEncoding(self, path):
          
          if os.path.exists(path) and path.lower().endswith('csv'):
              # encoding = self._detector.detect(path)
              encoding = None
  
              if encoding is not None:
                  if encoding.startswith('utf'):
                      encoding = encoding.replace('-', '')
                  encoding = encoding.replace('-','_')
  
                  viewValue = _encodings.get(encoding)
  
                  self._encodingKey = encoding
  
                  index = self._encodingComboBox.findText(viewValue.upper())
                  self._encodingComboBox.setCurrentIndex(index)
docs: Opens a file from the given `path` and checks the file encoding.
  
          The file must exists on the file system and end with the extension
          `.csv`. The file is read line by line until the encoding could be
          guessed.
          On a successfull identification, the widgets of this dialog will be
          updated.
  
          Args:
              path (string): Path to a csv file on the file system.