Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol type error when calling to_xlsx #184

Open
hauselin opened this issue May 6, 2024 · 1 comment
Open

Symbol type error when calling to_xlsx #184

hauselin opened this issue May 6, 2024 · 1 comment

Comments

@hauselin
Copy link

hauselin commented May 6, 2024

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:

self.worksheet[f'O{self.max_row + 1}'] = ",".join([symbol for symbol in tweet.symbols]) if tweet.symbols else ""

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
Copy link
Owner

The issue will be addressed in release. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants