From c73ba0c148eed359ec6f2a74138dba8299c5a72b Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 9 Jun 2010 10:23:31 +0100 Subject: [PATCH] Fixed further utf8 errors in the eve_api module --- eve_api/api_puller/accounts.py | 2 +- eve_api/api_puller/alliances.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eve_api/api_puller/accounts.py b/eve_api/api_puller/accounts.py index 76a64b6..ff338e3 100755 --- a/eve_api/api_puller/accounts.py +++ b/eve_api/api_puller/accounts.py @@ -101,7 +101,7 @@ def import_eve_character(api_key, user_id, character_id): params=auth_params, no_cache=False) - dom = minidom.parseString(char_doc.body) + dom = minidom.parseString(char_doc.body.encode('utf-8')) if dom.getElementsByTagName('error'): return diff --git a/eve_api/api_puller/alliances.py b/eve_api/api_puller/alliances.py index a1ed90b..306fc6a 100755 --- a/eve_api/api_puller/alliances.py +++ b/eve_api/api_puller/alliances.py @@ -73,7 +73,7 @@ def __start_full_import(): print "Querying /eve/AllianceList.xml.aspx/" alliance_doc = CachedDocument.objects.api_query('/eve/AllianceList.xml.aspx') print "Parsing..." - dom = minidom.parseString(alliance_doc.body) + dom = minidom.parseString(alliance_doc.body.encode('utf-8')) result_node_children = dom.getElementsByTagName('result')[0].childNodes # This will hold a reference to the