From fb128ee2a46bb40b9251728a9b290c108a885583 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Wed, 20 Oct 2021 12:51:34 +0100 Subject: [PATCH] Improve discord docs (#836) * add relative path to the terminal * add troubleshoot message to README * minor fix * Update labels.yml --- .github/workflows/labels.yml | 2 +- discordbot/README.md | 6 ++++++ discordbot/config_discordbot.py | 5 ++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index bd6a8842c7a..302b81cbf92 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -10,7 +10,7 @@ jobs: with: mode: minimum count: 1 - labels: "website, bug, build, do not merge, docker, docs, duplicate, enhancement, feat XS, feat S, feat M, feat L, feat XL, help wanted, refactor, tests" + labels: "website, bug, build, do not merge, docker, docs, duplicate, enhancement, feat XS, feat S, feat M, feat L, feat XL, help wanted, refactor, tests, discord" - uses: mheap/github-action-required-labels@v1 with: mode: exactly diff --git a/discordbot/README.md b/discordbot/README.md index 31c7f23c45c..b087bb9fa94 100644 --- a/discordbot/README.md +++ b/discordbot/README.md @@ -98,6 +98,12 @@ See more in [CONTRIBUTING.md](discordbot/CONTRIBUTING.md). ## Bugs +If when trying to run the discord bot you receive the following error +``` +ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed +``` +The solution is to browse to `Applications/Python 3.x` and double-click `Install Certificates.command`. + If an error occurs, use `DEBUG=True` on the [config_discordbot.py](gamestonk_terminal/config_discordbot.py) file. Then, report what is the issue with the console output attached either by: diff --git a/discordbot/config_discordbot.py b/discordbot/config_discordbot.py index 0762645d415..4b0809e0cba 100644 --- a/discordbot/config_discordbot.py +++ b/discordbot/config_discordbot.py @@ -8,9 +8,8 @@ env_files = [f for f in os.listdir() if f.endswith(".env")] if env_files: load_dotenv(env_files[0]) -# Path to the terminal -GST_PATH = os.path.join("~", "Documents", "GamestonkTerminal") -sys.path.append(GST_PATH) +# Relative path to the terminal +sys.path.append("..") # https://discord.com/developers/applications/ DISCORD_BOT_TOKEN = os.getenv("GT_DISCORD_BOT_TOKEN") or "REPLACE_ME"