title: Serverless Python Local Module Not Found
body: <p>I am looking to import my local python module file into my handler file in my serverless project, but despite this local file being located in the parent directory with my handler file it doesn't appear to recognize the module. I am relatively new to the python serverless setup and am wondering if there is something missing about how serverless file importation works.</p>
  <p><strong>Here are the files:</strong></p>
  <pre><code>/ (parent directory)
  data.py
  gather_keys_oauth2.py
  </code></pre>
  <p><strong>Error Message:</strong></p>
  <pre><code>Proxy Handler could not detect JSON:   File &quot;/Users/user/.nvm/versions/node/v12.14.0/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/invoke.py&quot;, line 72, in &lt;module&gt;
      module = import_module(args.handler_path.replace('/', '.'))
    File &quot;/Users/user/miniconda3/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
    File &quot;./data.py&quot;, line 4, in &lt;module&gt;
      import gather_keys_oauth2 as Oauth2
  ModuleNotFoundError: No module named 'gather_keys_oauth2'
  </code></pre>
  <p><strong>data.py:</strong></p>
  <pre><code>import json
  from datetime import timedelta, datetime
  import math
  import gather_keys_oauth2 as Oauth2
  import fitbit
  
  def auth(event, context):
  
      CLIENT_ID = '*client*'
      CLIENT_SECRET = '*secret*'
  
      server = Oauth2.OAuth2Server(CLIENT_ID, CLIENT_SECRET)
      server.browser_authorize()
  
      ACCESS_TOKEN = str(server.fitbit.client.session.token['access_token'])
      REFRESH_TOKEN = str(server.fitbit.client.session.token['refresh_token'])
  
      auth2_client = fitbit.Fitbit(CLIENT_ID, CLIENT_SECRET, oauth2=True, access_token=ACCESS_TOKEN, refresh_token=REFRESH_TOKEN)
  
      print(auth2_client)
  
      body = {
          &quot;message&quot;: &quot;Auth&quot;,
          &quot;input&quot;: event
      }
  
      response = {
          &quot;statusCode&quot;: 200,
          &quot;body&quot;: body['message']
      }
  
      return response
  </code></pre>