YoloSwagTeam / t2m

Twitter to Mastodon timeline forwarding tool
GNU General Public License v3.0
76 stars 15 forks source link

Error with retweets with only an image #4

Closed ghost closed 7 years ago

ghost commented 7 years ago

Trying to forward a retweet with only an image, results in the following error:

File "./t2m", line 139, in forward print("ERROR: could not forward the twitt [%s] '%s' because '%s', skipping for now" % (toot["id"], i["text"], e)) TypeError: 'Status' object has no attribute 'getitem'

This stopped t2m.

This retweet was the trigger: https://twitter.com/thereaIbanksy/status/854813123655630848

ghost commented 7 years ago

This is odd, I receive the exact error message when retweeting a non-empty tweet with 3 images.

The tweet: https://twitter.com/EdgarKruize/status/855081016599478273

Psycojoker commented 7 years ago

Hey,

I've just fix the error message you get, which is an error in the debug message formatting, not the real error. I've tried to reproduce the error to get the real error message but couldn't with the bansky tweet, could you tried it again with master plz?

ghost commented 7 years ago

No, still doesn't work after a git pull. Last lines of the error output is:

ERROR: could not forward the twitt [855130881429786626] 'RT @thereaIbanksy@twitter.com: https://t.co/bNm4bu8h4Z ' because 'Could not complete request: ', skipping for now Forwarded 1 tweets from jeroenpraat to jeroenpraat@mastodon.social

It says on the final line it did forward, but it didn't.

Psycojoker commented 7 years ago

Yes, the last line lied, I've just fixed that.

Yep, that wasn't going to work but this will show the real error which is ... absolutely not useful at all :/ I've pushed another commit that should give more information to debug, can you try it and show me the new error message plz?

Btw, that looks like an authentification/connectivity problem with mastodon.social from here.

ghost commented 7 years ago

MastodonNetworkError: Could not complete request: ERROR: could not forward the twitt [855179126533128192] 'RT @thereaIbanksy@twitter.com: https://t.co/bNm4bu8h4Z ' because 'Could not complete request: ', skipping for now Forwarded 0 tweets from jeroenpraat to jeroenpraat@mastodon.social

I don't have problems with normal tweets or most other retweets on mastodon.social. This is my retweet.tmpl btw:

RT @%(user)s@twitter.com: %(text)s

ghost commented 7 years ago

I tried it with

RT @%(user)s %(text)s

But same results.

ghost commented 7 years ago

Probably solved with https://github.com/Psycojoker/t2m/commit/3b81a46ab7c32eb08ff6127213984e101e624b16 (#5). Please make a new issue when still an issue.