title: Python: TypeError shows up during CI/CD process
body: <p>I tried to add a TXT file into my python package, load it by <code>pkg_resources</code>, and do some other stuff with data after that. The structure of my python package is following:</p>
  
  <pre><code>package_name
    |-- requirements.txt
    |-- setup.py
    |-- MANIFEST.in
    |-- package
      |-- __init__.py
      |-- name
        |-- __init__.py
        |-- my_file.py
        |-- test
          |-- __init__.py
          |-- test_1.py
        |-- data
          |-- MY_DATA.txt
  </code></pre>
  
  <p>The content of <code>~/package_name/package/name/my_file.py</code>:</p>
  
  <pre><code>import pkg_resources
  
  DATA_PATH = 'package.name.data'
  MY_DATA_PATH = pkg_resources.resource_filename(DATA_PATH, 'MY_DATA.txt')
  
  
  def do_some_stuff_with_data(data_path=MY_DATA_PATH):
      ...
  </code></pre>
  
  <p>When I run tests on my local machine, the code runs without any problem. However, when I try to push it into <code>git</code> repository via CI/CD, tests fail on the error below:</p>
  
  <pre><code>/tmp/testenv/lib/python3.7/site-packages/package/name/test/test_name.py:13: in &lt;module&gt;
      from package.name.my_file import (
  /tmp/testenv/lib/python3.7/site-packages/package/name/my_file.py:28: in &lt;module&gt;
      MY_DATA_PATH = pkg_resources.resource_filename(DATA_PATH, 'MY_DATA.txt')
  /tmp/testenv/lib/python3.7/site-packages/pkg_resources/__init__.py:1206: in resource_filename
      return get_provider(package_or_requirement).get_resource_filename(
  /tmp/testenv/lib/python3.7/site-packages/pkg_resources/__init__.py:437: in get_provider
      return _find_adapter(_provider_factories, loader)(module)
  /tmp/testenv/lib/python3.7/site-packages/pkg_resources/__init__.py:1452: in __init__
      self.module_path = os.path.dirname(getattr(module, '__file__', ''))
  /tmp/testenv/lib/python3.7/posixpath.py:156: in dirname
      p = os.fspath(p)
  E   TypeError: expected str, bytes or os.PathLike object, not NoneType
  </code></pre>
  
  <p>I know, that data path is written correctly. I checked the typos for several times. I also thought that the error could have been caused by not adding data path to <code>MANIFEST.in</code> file. However, the addition did not solve the problem.</p>
  
  <p>Do you have any idea what I am missing?</p>