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

[Bug] Reddit API Keys: Only 4/5 Inputs Are Sent To .env #1645

Closed
deeleeramone opened this issue Apr 6, 2022 · 3 comments · Fixed by #1639
Closed

[Bug] Reddit API Keys: Only 4/5 Inputs Are Sent To .env #1645

deeleeramone opened this issue Apr 6, 2022 · 3 comments · Fixed by #1639
Assignees
Labels
bug Fix bug

Comments

@deeleeramone
Copy link
Contributor

[Bug] Reddit API Keys: Only 4/5 Inputs Are Sent To .env

image

This results in the wrong fields being populated by input. For example,

OPENBB_API_REDDIT_PASSWORD='Danglewood69420'

This is my username. To remedy this, I edited the .env file to add this line:

OPENBB_API_REDDIT_USERNAME='Danglewood69420'

Then re-arranged the incorrectly populated fields.

The result was a Key that passes tests and is correctly recalled when restarting the terminal.

@deeleeramone
Copy link
Contributor Author

the following message is printed when using the command: /stocks/ba/wsb

/Users/danglewood/GitHub/GST1/miniconda3/envs/gst/lib/python3.8/site-packages/psaw/PushshiftAPI.py:244: UserWarning: Not all PushShift shards are active. Query results may be incomplete
  warnings.warn(shards_down_message)

This does not prevent the terminal from returning results.

@salvadorgarcia23
Copy link

Attempted the procedure above with little success.

OS: Windows 10
Application: OpenBB Terminal
Installation Method: https://github.com/OpenBB-finance/OpenBBTerminal/releases/tag/v1.0.0 downloaded Windows setup.exe
Problem: Cannot connect Reddit API
Error: defined, test failed

As mentioned by deeleeramone, when attempting to enter variables using terminal command: /keys/reddit -i [Client ID] -s [Client Secret] -u [Username] -p [Password] -a [User Agent], the .env file is erroneously entering in the information in the improper fields.

As an example:
OPENBB_API_REDDIT_CLIENT_ID is being defined by whatever variable is entered in for: -p

Below is a list of the rest of the variables (Some are correct)
OPENBB_API_REDDIT_CLIENT_SECRET is being defined by whatever variable is entered in for -s
OPENBB_API_REDDIT_PASSWORD is being defined by whatever variable is entered in for -u
OPENBB_API_REDDIT_USER_AGENT is being defined by whatever variable is entered in for -a
-i is completely missing from the equation. (It is not found in the .env when entered as a variable within terminal)

Additionally, when viewing the .env, it seems like there are lines that are out of order / missing.

@Chavithra Chavithra linked a pull request Apr 6, 2022 that will close this issue
@Chavithra
Copy link
Contributor

@deeleeramone @salvadorgarcia23 Thanks for your feedback !

@Chavithra Chavithra self-assigned this Apr 6, 2022
@Chavithra Chavithra added the bug Fix bug label Apr 6, 2022
Chavithra pushed a commit that referenced this issue Apr 6, 2022
* fix logic

* meeting with chavi

* black

* changed logic

* fix reddit credentials

Co-authored-by: Colin Delahunty <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants