title: AttributeError: 'PosixPath' object has no attribute 'startswith'
body: <p>I have a problem with pytest, I just followed the documentation here <a href="https://docs.pytest.org/en/7.1.x/" rel="nofollow noreferrer">https://docs.pytest.org/en/7.1.x/</a> so when I run this command <strong>pytest</strong> in my terminal an I got this:</p>
  <pre class="lang-none prettyprint-override"><code> packages/_pytest/assertion/rewrite.py&quot;, line 168, in exec_module
          exec(co, module.__dict__)
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/faker/__init__.py&quot;, line 1, in &lt;module&gt;
          from faker.factory import Factory
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 991, in _find_and_load
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 975, in _find_and_load_unlocked
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 671, in _load_unlocked
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/_pytest/assertion/rewrite.py&quot;, line 168, in exec_module
          exec(co, module.__dict__)
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/faker/factory.py&quot;, line 7, in &lt;module&gt;
          from faker.config import AVAILABLE_LOCALES, DEFAULT_LOCALE, PROVIDERS
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 991, in _find_and_load
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 975, in _find_and_load_unlocked
        File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 671, in _load_unlocked
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/_pytest/assertion/rewrite.py&quot;, line 168, in exec_module
          exec(co, module.__dict__)
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/faker/config.py&quot;, line 11, in &lt;module&gt;
          PROVIDERS = find_available_providers(
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/faker/utils/loading.py&quot;, line 57, in find_available_providers
          for mod in list_module(providers_mod) if mod != '__pycache__'
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/faker/utils/loading.py&quot;, line 35, in list_module
          return [name for _, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]
        File &quot;/home/youssfi/.local/lib/python3.8/site-packages/faker/utils/loading.py&quot;, line 35, in &lt;listcomp&gt;
          return [name for _, name, is_pkg in pkgutil.iter_modules([path]) if is_pkg]
        File &quot;/usr/lib/python3.8/pkgutil.py&quot;, line 129, in iter_modules
          for i in importers:
        File &quot;/usr/lib/python3.8/pkgutil.py&quot;, line 419, in get_importer
          importer = path_hook(path_item)
        File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 1594, in path_hook_for_FileFinder
        File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 1469, in __init__
        File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 177, in _path_isabs
      AttributeError: 'PosixPath' object has no attribute 'startswith'
  </code></pre>
  <p>My version is Python 3.8.10.</p>
  <p>This is my code:</p>
  <pre><code># content of test_sample.py
  def inc(x):
      return x + 1
  
  
  def test_answer():
      assert inc(3) == 5
  </code></pre>
  <p>this is my file Python:</p>
  <blockquote>
  <p>test_sample.py</p>
  </blockquote>
  <h2>can someone have any idea about this?</h2>