mahrtayyab / tweety

Twitter Scraper
494 stars 67 forks source link

Symbol type error when calling to_xlsx #184

Closed hauselin closed 5 months ago

hauselin commented 6 months ago

When calling tweets.to_xlsx(), I sometimes get a TypeError.

tweets = app.get_tweets(863298232516042752, replies=True, pages=1)
tweets.to_xlsx("tweet.xlsx")
# TypeError: sequence item 0: expected str instance, Symbol found

The error is on this line:

https://github.com/mahrtayyab/tweety/blob/7a7eedd6faf361d990be6b37aec3f4249fbc10ea/src/tweety/types/twDataTypes.py#L116

Suggestion solution below

# symbol.text instead?
self.worksheet[f'O{self.max_row + 1}'] = ",".join([symbol.text for symbol in tweet.symbols]) if tweet.symbols else ""
mahrtayyab commented 6 months ago

The issue will be addressed in release. Thank you.

mahrtayyab commented 5 months ago

It is fixed , please do consider upgrading