Sarkash / 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

"IndexError: list index out of range" #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./livejournal2blogger.sh -u float_dublin -p ***

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "./../src/livejournal2blogger/lj2b.py", line 468, in <module>
    translator.Translate(sys.stdout)
  File "./../src/livejournal2blogger/lj2b.py", line 202, in Translate
    comments = self._GetComments()
  File "./../src/livejournal2blogger/lj2b.py", line 319, in _GetComments
    comments.append(self._TranslateComment(comment, user_map))
  File "./../src/livejournal2blogger/lj2b.py", line 350, in _TranslateComment
    subject = self._GetText(xml_comment.getElementsByTagName('subject')[0])
IndexError: list index out of range

What version of the product are you using? On what operating system?
ubuntu hardy
Linux hvan 2.6.24-22-generic #1 SMP Mon Nov 24 18:32:42 UTC 2008 i686 GNU/Linux
Python 2.5.2

Tried trunk
Repository Root: http://google-blog-converters-appengine.googlecode.com
Revision: 60

Please provide any additional information below.

Original issue reported on code.google.com by Kostya.H...@gmail.com on 14 Jan 2009 at 9:10

GoogleCodeExporter commented 8 years ago
You can try the patch.

Original comment by mathemonkey on 14 Jan 2009 at 9:23

Attachments:

GoogleCodeExporter commented 8 years ago
i've got 

Traceback (most recent call last):
  File "./../src/livejournal2blogger/lj2b.py", line 470, in <module>
    translator.Translate(sys.stdout)
  File "./../src/livejournal2blogger/lj2b.py", line 202, in Translate
    comments = self._GetComments()
  File "./../src/livejournal2blogger/lj2b.py", line 319, in _GetComments
    comments.append(self._TranslateComment(comment, user_map))
  File "./../src/livejournal2blogger/lj2b.py", line 342, in _TranslateComment
    self._GetText(xml_comment.getElementsByTagName('body')[0]))
IndexError: list index out of range

with r61 + mathemonkey patch. i think lj returned some very different page 
compared
to expected one. this happens in few minutes after script was started.

Original comment by Kostya.H...@gmail.com on 14 Jan 2009 at 9:38

GoogleCodeExporter commented 8 years ago
i mean r60, spell error

Original comment by Kostya.H...@gmail.com on 14 Jan 2009 at 9:38

GoogleCodeExporter commented 8 years ago
may be some logging will help to debug this series of index errors? currently 
only
stack is available, but it seems to me that it's not enough. 

Original comment by Kostya.H...@gmail.com on 14 Jan 2009 at 9:42

GoogleCodeExporter commented 8 years ago
Try r61, seems you're suffering from issue #13.

Original comment by mathemonkey on 15 Jan 2009 at 5:14

GoogleCodeExporter commented 8 years ago
r61 does not solves issue, output is same as in this issue description

Original comment by Kostya.H...@gmail.com on 15 Jan 2009 at 9:00

GoogleCodeExporter commented 8 years ago
I meant r61 + subject.patch

r61 fixed issue with deleted comments but it did not fix issue with comments 
without
subject. The subject.patch fixes handling of comments without subject.

I doubt that there are non-deleted comments without subject and body.

Original comment by mathemonkey on 15 Jan 2009 at 9:07

GoogleCodeExporter commented 8 years ago
Hi.

I've just committed mathemonkey's subject patch.  It's r62.  Please give it a 
try and
let me know that you've verified this as a fix for your problem Kostya.

Thanks again to you both for helping out.

Original comment by jlu...@gmail.com on 15 Jan 2009 at 5:28

GoogleCodeExporter commented 8 years ago
with r62 i've got this:
Traceback (most recent call last):
  File "./../src/livejournal2blogger/lj2b.py", line 472, in <module>
    translator.Translate(sys.stdout)
  File "./../src/livejournal2blogger/lj2b.py", line 206, in Translate
    outfile.write(str(feed))
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 334, in __str__
    return self.ToString()
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 331, in ToString
    return ElementTree.tostring(self._ToElementTree(), encoding=string_encoding)
  File "./../src/livejournal2blogger/lj2b.py", line 61, in _ToElementTree
    tree = gdata.GDataFeed._ToElementTree(self)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 326, in _ToElementTree
    self._AddMembersToElementTree(new_tree)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 286, in _AddMembersToElementTree
    instance._BecomeChildElement(tree)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 314, in _BecomeChildElement
    self._AddMembersToElementTree(new_child)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 288, in _AddMembersToElementTree
    member._BecomeChildElement(tree)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 314, in _BecomeChildElement
    self._AddMembersToElementTree(new_child)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 299, in _AddMembersToElementTree
    ExtensionContainer._AddMembersToElementTree(self, tree)
  File
"/home/float-dublin/Desktop/google-blog-converters-appengine-read-only/lib/atom/
__init__.py",
line 185, in _AddMembersToElementTree
    tree.text = self.text.decode(MEMBER_STRING_ENCODING)
AttributeError: 'int' object has no attribute 'decode'

Original comment by Kostya.H...@gmail.com on 15 Jan 2009 at 6:31

GoogleCodeExporter commented 8 years ago
made this issue 17

Original comment by Kostya.H...@gmail.com on 15 Jan 2009 at 6:34