AmauryCarrade / MastodonToTwitter

Mastodon <-> Twitter cross-poster.
MIT License
250 stars 41 forks source link

'NoneType' object has no attribute 'group' #68

Open tz-jason opened 3 years ago

tz-jason commented 3 years ago

Hi,

I wanted to start using this, but after I created a toot in my mastodon instance, it crashes when it was syncing the data as below screen prompt:

[20/02/2021 23:03:10] [Mastodon -> Twitter] Listening for toots… None Exception in thread Mastodon -> Twitter: Traceback (most recent call last): File "/home/mastodon/MastodonToTwitter.clone/mtt/mastodon_to_twitter.py", line 232, in run self.mastodon_api.stream_user(TootsListener(self), run_async=False) File "", line 2, in stream_user File "/home/mastodon/.local/lib/python3.6/site-packages/mastodon/Mastodon.py", line 102, in wrapper return function(self, *args, **kwargs) File "/home/mastodon/.local/lib/python3.6/site-packages/mastodon/Mastodon.py", line 3110, in stream_user return self.stream('/api/v1/streaming/user', listener, run_async=run_async, timeout=timeout, reconnect_async=reconnect_async, reconnect_async_wait_sec=reconnect_async_wait_sec) File "/home/mastodon/.local/lib/python3.6/site-packages/mastodon/Mastodon.py", line 3628, in stream listener.handle_stream(r) File "/home/mastodon/.local/lib/python3.6/site-packages/mastodon/streaming.py", line 79, in handle_stream self._dispatch(event) File "/home/mastodon/.local/lib/python3.6/site-packages/mastodon/streaming.py", line 152, in _dispatch handler(payload) File "/home/mastodon/MastodonToTwitter.clone/mtt/mastodon_to_twitter.py", line 144, in on_update url=toot['uri'] File "/home/mastodon/MastodonToTwitter.clone/mtt/utils.py", line 164, in split_status print(match.group(1)) AttributeError: 'NoneType' object has no attribute 'group'

tz-jason commented 3 years ago

sure, I have created a toot using a hashtag in Mastodon, that is ok for syncing data from mastodon to twitter now, but when I create a tweet using a hashtag, there is no response for syncing data from Twitter to mastodon.