nhoening / gritttt-rss

Implements 'cancelled' sharing-features of Google Reader for the excellent open-source RSS-Reader TinyTiny-RSS: share any page on the web via a bookmarklet and show your shared items in a widget on any website you want. Also allow to import shared&starred articles from Google Reader.
gritttt-rss.nicolashoening.de
Other
48 stars 4 forks source link

Error when import starred items #46

Closed pastukhov closed 11 years ago

pastukhov commented 11 years ago

Hello, i'm getting error when trying to import starred.json form greader:

Writing gritttt-import.sql ... Reading in data from starred.json ... Traceback (most recent call last): File "import.py", line 132, in counter = write_sql(items, False, counter) File "import.py", line 93, in write_sql link = item['alternate'][0]['href'] KeyError: 'alternate'

nhoening commented 11 years ago

It seems Google changed the format of exported data since I did this. I'll see if it is easy for me to fix this and get back to you.

pastukhov commented 11 years ago

Thanks!

2013/3/15 Nicolas Honing notifications@github.com

It seems Google changed the format of exported data since I did this. I'll see if it is easy for me to fix this and get back to you.

— Reply to this email directly or view it on GitHubhttps://github.com/nhoening/gritttt-rss/issues/46#issuecomment-14956182 .

nhoening commented 11 years ago

I just updated code. Mainly, I just changed the filenames, which are different now in Googles export (but you probably did that manually) and skipped items without href information. I just exported my data again and had no issues with the previous code, so there is something in your export data that is unusual (no URL for the item in question). Skipping those items is the only sensible action I could take. If you want, you can post the json code for the item(s) in question here (the importer will tell you the IDs of skipped items), and we can see if we can import them after all.

pastukhov commented 11 years ago

I have starred.json, that ~8 Mb

pastukhov commented 11 years ago

Everything fine! Thanks!

nhoening commented 11 years ago

Just out of interest, how many items were skipped?

pastukhov commented 11 years ago

1 Could not import item with id tag:google.com,2005:reader/item/a19762a814cdd79f. It does not seem to have any href-inforamtion.

2013/3/15 Nicolas Honing notifications@github.com

Just out of interest, how many items were skipped?

— Reply to this email directly or view it on GitHubhttps://github.com/nhoening/gritttt-rss/issues/46#issuecomment-14958749 .

nhoening commented 11 years ago

That's good, then. Must simply be an error in the data or so. Ah, I see an embarrassing typo in the message :)

pastukhov commented 11 years ago

I'm getting error, when importing sql

with this string:

INSERT INTO ttrss_entries (guid, title, link, date_entered, date_updated, updated, content) VALUES (' http://bash.org.ru/quote/413469,imported:1363351850.511050', 'ãÉÔÁÔÁ

413469', 'http://bash.org.ru/quote/413469', '2011-09-27 10-12-01',

'2011-09-27 10-12-01', '2011-09-27 10-12-01', 'xxx: ÔÙ × ÂÌÅÎÄÅÒÁÈ ÞÔÏ-ÔÏ ÒÕÂÉÛØ?
yyy: Ï×ÏÝÉ/ÆÒÕËÔÙ
xxx: ÎÕ × ÐÌÁÎÅ "ÐÏÎÉÍÁÅÛØ/ÒÁÚÂÉÒÁÅÛØÓÑ" =\');

ERROR at line 2: Unknown command '\"'.

2013/3/15 Nicolas Honing notifications@github.com

That's good, then. Must simply be an error in the data or so. Ah, I see an embarrassing typo in the message :)

Reply to this email directly or view it on GitHubhttps://github.com/nhoening/gritttt-rss/issues/46#issuecomment-14959039 .

nhoening commented 11 years ago

oh, you're a good tester. The content of http://bash.im/quote/413469 has a slash at the end, which I think doesn't work with the ' I put around the content. I'll try to fix this, will report back...

nhoening commented 11 years ago

Hope that helps you.