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

Hotfix/spacc errors #5010

Closed
wants to merge 10 commits into from

Conversation

Ltwo3five
Copy link
Contributor

Description

Summary of the change / bug fix.

Using finviz.get_stock(t_ticker[0]) to validate the tickers in a for loop throws error 429 which causes some tickers that were mentioned in the reddit posts on r/spacc to not appear in the result
I used screener_view from finvizfinance to return a list of all tickers to compare against instead.
Additionally the function print_rich_table has logic which was converting any column entry that is not a time stamp into a numeric value. praw.models.reddit.subreddit.Subreddit class could not be converted into int which throws a value error, and if it is not converted into the correct type when the dataframe is converted into JSON, a recursion error will be thrown.
My solution was to convert all column entries into strings in the except block

- Link # issue, if applicable.

#4929

- Screenshot of the feature or the bug before/after fix, if applicable.

tables are now printing when command is run

spacc1

- List any dependencies that are required for this change.

  finvizfinance

How has this been tested?

End to End tests and running existing tests

Please describe the tests that you ran to verify your changes.

Ran all tests to see if changes cause any error

Provide instructions so we can reproduce.

Command /stocks/ba/spacc

Please also list any relevant details for your test configuration.

  • Make sure affected commands still run in terminal
  • Ensure the SDK still works
  • Check any related reports

Checklist:

Others

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

@reviewpad reviewpad bot added the feat XS Extra small feature label May 12, 2023
@jmaslek jmaslek changed the base branch from main to develop May 15, 2023 16:02
@jmaslek
Copy link
Collaborator

jmaslek commented May 17, 2023

Hey! Nice one! Can this be edited so that not so many windows pop up?

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

Successfully merging this pull request may close these issues.

2 participants