zhaohao / google-blog-converters-appengine

Automatically exported from code.google.com/p/google-blog-converters-appengine
Apache License 2.0
0 stars 0 forks source link

Error encountered during conversion in https://livejournal2blogger.appspot.com/ #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. i'm put user and password in https://livejournal2blogger.appspot.com/
2. push Login
3. have error

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.
Error encountered during conversion.

Traceback (most recent call last):
File
"/base/data/home/apps/livejournal2blogger/1.330658731847903481/livejournal2blogg
er.py",
line 40, in post
translator.Translate(self.response.out)
File
"/base/data/home/apps/livejournal2blogger/1.330658731847903481/lj2b.py",
line 198, in Translate
posts = self._GetPosts()
File
"/base/data/home/apps/livejournal2blogger/1.330658731847903481/lj2b.py",
line 238, in _GetPosts
'auth_response': challenge_response})
File "/base/python_dist/lib/python2.5/xmlrpclib.py", line 1147, in __call__
return self.__send(self.__name, args)
File "/base/python_dist/lib/python2.5/xmlrpclib.py", line 1437, in __request
verbose=self.__verbose
File
"/base/data/home/apps/livejournal2blogger/1.330658731847903481/gaexmlrpclib.py",
line 45, in request
result = self.__parse_response(response.content)
File
"/base/data/home/apps/livejournal2blogger/1.330658731847903481/gaexmlrpclib.py",
line 52, in __parse_response
return u.close()
File "/base/python_dist/lib/python2.5/xmlrpclib.py", line 787, in close
raise Fault(**self._stack[0])
Fault:

Original issue reported on code.google.com by alexey.matvienko@gmail.com on 13 Jan 2009 at 9:01

GoogleCodeExporter commented 9 years ago
JJ, the actual error message in the last line (after "Fault:") got eaten by the
browser because you don't do HTML escaping in line 49 of
src/livejournal2blogger/livejournal2blogger.py:
http://code.google.com/p/google-blog-converters-appengine/source/browse/trunk/sr
c/livejournal2blogger/livejournal2blogger.py?r=57#49

You're setting Content-Type to text/plain there but it is actually displayed as
text/html in my Firefox 3 and I guess in Alexey's browser as well. I'm not sure 
why.
According to my Firebug network trace, it's a server-side problem — the 
response
headers contain this:

  Content-Type: text/html; charset=utf-8

But even if you get the server send real text/plain, browsers may force it back 
to
text/html because they're doing content sniffing. (When a browser sees some 
HTML tags
near the beginning of the response body, it will render it as HTML no matter 
what
MIME type the server actually declared.)

What do you think about changing the Content-Type to text/html and outputting 
the
Python error trace fully HTML-escaped into a <pre> element?

Original comment by alexkon on 14 Jan 2009 at 7:10

GoogleCodeExporter commented 9 years ago
To make the first paragraph more clear, here is an example error message when 
the
password entered is wrong:

Fault: <Fault 101: 'Invalid password'>

Original comment by alexkon on 14 Jan 2009 at 7:26

GoogleCodeExporter commented 9 years ago
Thanks for the comment, alexkon.  You're definitely correct in your analysis.

I'll patch this up today with your <pre> element idea.

Original comment by jlu...@gmail.com on 14 Jan 2009 at 3:18

GoogleCodeExporter commented 9 years ago
I checked in a change which traps explicitly for Faults from the XML-RPC calls 
and
displays just the fault.  Also, I'm not escaping all error output for better 
display
in the browser.

The hosted application has been updated with this change.

Original comment by jlu...@gmail.com on 14 Jan 2009 at 5:04

GoogleCodeExporter commented 9 years ago
JJ, thanks for the quick fix!

Alexey, could you please try again now and tell me if it worked for you?
Если Вам проще говорить по-русски, напишите 
мне на alexkon@gmail.com.
(Translation: If you find speaking Russian easier, please write to me at
alexkon@gmail.com.)

Original comment by alexkon on 14 Jan 2009 at 5:50

GoogleCodeExporter commented 9 years ago
thanks for comments and fix this problem!

but now i have:
"A server error occurred.  Please contact the administrator."

maybe it becouse i have very big history in my Livejournal account?

Original comment by alexey.matvienko@gmail.com on 19 Feb 2009 at 5:59

GoogleCodeExporter commented 9 years ago
i was see how many posts in my livejournal.. it's about 820 messages in my diary

Original comment by alexey.matvienko@gmail.com on 20 Feb 2009 at 10:55

GoogleCodeExporter commented 9 years ago
Alexey,

That is a rather large journal, but Blogger should be able to handle it.  Can 
you
make sure that the output of the livejournal2blogger file is valid XML?  I 
assume
that this problem is due to something in the converted file that Blogger does 
not
recognize, invalid XML being just one possibility.

If you like, I can take a look at the converted file to see if I see anything 
that
looks suspicious.  

Original comment by jlu...@gmail.com on 20 Feb 2009 at 4:47

GoogleCodeExporter commented 9 years ago
i havn't any file

i was put livejoirnal login and passord to form
(https://livejournal2blogger.appspot.com) and get error after post:
"A server error occurred.  Please contact the administrator."

that's all i have ;)
my livejournal: alucky.livejournal.com

Original comment by alexey.matvienko@gmail.com on 21 Feb 2009 at 5:24

GoogleCodeExporter commented 9 years ago
new error! :)

"Error: Server Error
The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this error 
message
and the query that caused it."

Original comment by alexey.matvienko@gmail.com on 24 Feb 2009 at 6:47

GoogleCodeExporter commented 9 years ago
i cant start python script on my notebook, becouse i cant get access to 
livejournal
(we think goverment close it).
so i can only use this service or proxy
if you will add http proxy support to this project, i will try to use it with 
that

Original comment by alexey.matvienko@gmail.com on 24 Feb 2009 at 6:50