title: API reads NoneType when it should be a str. Using ALPACA API
body: <p>I'm working on a basic trade bot using ALPACA API to read-in market information. This is a small project that I'm posting to git hub. There's no real assets or money involved. But I will use my alpaca API keys. I wish to embed my program with my API to fetch market data in real-time. But os.getenv is not reading the API keys correctly. They should be str-type but it reads-in as NoneType.</p>
  <p>Imports</p>
  <pre><code>import os
  from pathlib import Path
  import alpaca_trade_api as tradeapi
  import pandas as pd
  import numpy as np
  import datetime
  import time
  from dotenv import load_dotenv
  </code></pre>
  <p>First. I load my environment variable file.</p>
  <pre><code>load_dotenv('.env')
  </code></pre>
  <p>Second. Set variables to store my alpaca API keys via os.getnev() that will scrape my environment variables file for the exact name with the API key.</p>
  <pre><code>alpaca_api_key = os.getenv('ALPACA_API_KEY')
  alpaca_secret_key = os.getenv('ALPACA_SECRET_KEY')
  </code></pre>
  <p>Third. Test to see if os.getenv read-in my API keys as a str-type. It doesn't. It's reading NoneType</p>
  <pre><code>print(f&quot;ALPACA_API_KEY type is: {type(alpaca_api_key)}&quot;)
  print(f&quot;ALPACA_SECRET_KEY type is: {type(alpaca_secret_key)}&quot;)
  </code></pre>
  <p>Output</p>
  <p>ALPACA_API_KEY type is: &lt;class 'NoneType'&gt;</p>
  <p>ALPACA_SECRET_KEY type is: &lt;class 'NoneType'&gt;</p>
  <p><strong>What I did to try to resolve issues:</strong></p>
  <ul>
  <li>Restarting the program isn't doing anything.</li>
  <li>I have my environment variables file in the same directory as my program to make reading in easier.</li>
  <li>The names and spelling of the API as it appears in my .env file are exactly correct.</li>
  </ul>
  <p>What can I do? I need the ALPACE_API_KEY and ALPACA_SECRET_KEY to read str.</p>
  <p>The only other way to get this work is to directly set the variables to the exact string value of the API key, which I don't want to do because it exposes my API. I plan on posting this bot program to my git hub with a .gitignore to hide my API keys.</p>
  <pre><code>alpaca_api_key = &lt;actual API key&gt;
  alpaca_secret_key = &lt;actual secret key&gt;
  
  </code></pre>
  <p>What's a good way to get this to work?</p>