diff --git a/sfdclib/session.py b/sfdclib/session.py index f84a5de..82ce906 100644 --- a/sfdclib/session.py +++ b/sfdclib/session.py @@ -47,7 +47,7 @@ def login(self): password += self._token data = SfdcSession._LOGIN_TMPL.format(**{'username': self._username, 'password': password}) r = self.post(url, headers=headers, data=data) - root = ET.fromstring(r.text) + root = ET.fromstring(r.text.encode('utf-8')) if root.find('soapenv:Body/soapenv:Fault', SfdcSession._XML_NAMESPACES): raise Exception("Could not log in. Code: %s Message: %s" % ( root.find('soapenv:Body/soapenv:Fault/faultcode', SfdcSession._XML_NAMESPACES).text, @@ -74,4 +74,4 @@ def get_session_id(self): return self._session_id def is_connected(self): - return True if self._instance else False + return True if self._instance else False \ No newline at end of file