EVE-SECURE / eveapiproxy

Automatically exported from code.google.com/p/eveapiproxy
0 stars 0 forks source link

problem with some uncode chars the corp description #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

I had a problem with getting CorporationSheet.xml.aspx for our corp.

The error was:

'ascii' codec can't decode byte 0xc3 in position 657: ordinal not in 
range(128)
Traceback (most recent call last):
  File 
"/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 
507, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/kendra/api2.336674091631049458/main.py", line 
111, in get
    Proxy.get(self)
  File "/base/data/home/apps/kendra/api2.336674091631049458/main.py", line 
52, in get
    apiCallResult.value = db.Text(p.sub("'",value.content))                         
# Set the response text
  File 
"/base/python_lib/versions/1/google/appengine/api/datastore_types.py", line 
1028, in __new__
    return super(Text, cls).__new__(cls, arg, encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 657: 
ordinal not in range(128)

Instead of "fixing" the xml from the api server I prefer to save it as blob 
and send it unchanged... because I don't think a proxy should change the 
content.

Original issue reported on code.google.com by dafire@gmail.com on 29 Sep 2009 at 7:50

Attachments:

GoogleCodeExporter commented 9 years ago
I just got this error while pulling down /char/MailMessages.xml.aspx.  May not 
be a 
bad idea (despite security concerns) to leave CCP's results unmolested.

Regards,

z.

Original comment by zakal...@gmail.com on 25 Jan 2010 at 1:41

GoogleCodeExporter commented 9 years ago
I'll have to look more carefully at this one when I have more time.  Way back 
when, I
didn't have the p = re.compile("'") line in the code, and it caused other 
problems. 
I can't remember if it caused GQL or XML response errors, but it made it 
impossible
for anyone with a "'" in their character name to use the proxy.

I agree iwth dafire's comment about not changing the content, but the "'" is not
permitted in the XML...

Original comment by Erik.E.E...@gmail.com on 25 Jan 2010 at 2:21

GoogleCodeExporter commented 9 years ago
I loaded up your suggested changes as verion 7 but left version 6 as the 
default.  To
try version 7, change the URL to http://7.latest.eveapiproxy.appspot.com/.

Let me know if it works.  If it does, we can promonte it to the default.

Original comment by Erik.E.E...@gmail.com on 25 Jan 2010 at 2:50

GoogleCodeExporter commented 9 years ago
I was able to pull down my mail messages with Version 7.  I'm not 100% sure of 
an 
exact test case that causes Version 6 to fail (yet).  I will have to wait 1/2 
hour 
(probably till tomorrow) till I can re-try the MailMessages with Version 6 to 
know for 
sure if things have improved.

Regards,

z.

Original comment by zakal...@gmail.com on 25 Jan 2010 at 5:59