title: KeyError with os.environ[] accessing variable from .env file
body: <p>I'm trying to build a slackbot and retrieve the slack token from a separate .env file. When I run it, I get thrown an error that looks like this:</p>
  <pre><code>raise KeyError(key) from None
  KeyError: 'SLACK_TOKEN'
  </code></pre>
  <p>The code for the bot (ShoppingListBot.py) is here:</p>
  <pre><code>import slack
  import os
  from pathlib import Path
  from dotenv import load_dotenv
  
  env_path = Path('.') / '.env'
  load_dotenv(dotenv_path=env_path)
  
  client = slack.WebClient(token=os.environ[&quot;SLACK_TOKEN&quot;])
  </code></pre>
  <p>The code for the .env file (.env) is here:</p>
  <pre><code>SLACK_TOKEN=&quot;xoxb-1691324762768-1693412284260-RdP0ZQUaQxD9j9mtLlwfNMbD&quot;
  </code></pre>