﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32626	TypeError while using Selenium with Django 3.2	Fabrice Jaouën	nobody	"Hello, 
I'm developing a Django project and a puzzling error has popped up, while using Selenium.
- The Selenium tests run smoothly and pass, despite this error message
- The unitary tests as well.
- When I launch the server, the project runs fine, as well...
Here is the Selenium starting point:
{{{
class CustomUserTest(LiveServerTestCase):
    fixtures = ['users.json']

    @classmethod
    def setUpClass(cls):
        super().setUpClass()
        cls.browser = Firefox()
        cls.browser.implicitly_wait(10)

    @classmethod
    def tearDownClass(cls):
        cls.browser.quit()
        super().tearDownClass()

    def test_plaid_10_authenticate_on_the_website(self):
        self.browser.get(os.path.join(self.live_server_url, ''))
}}}


There is only a puzzling error message, which does not seem being related to my project, as everything else is ok.
Here is an excerpts of the issue: 

{{{
  File ""Users/myname/Documents/myfolder/myproject/venv/lib/python3.7/site-packages/django/test/testcases.py"", line 1417, in serve
    return serve(request, final_rel_path, document_root=self.get_base_dir())
  File ""Users/myname/Documents/myfolder/myproject/venv/lib/python3.7/site-packages/django/views/static.py"", line 36, in serve
    fullpath = Path(safe_join(document_root, path))
  File ""Users/myname/Documents/myfolder/myproject/venv/lib/python3.7/site-packages/django/utils/_os.py"", line 17, in safe_join
    final_path = abspath(join(base, *paths))
  File ""/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py"", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
[09/Apr/2021 07:13:07,948] - Broken pipe from ('127.0.0.1', 54981)
}}}
 Here is a copy of my requirements.txt:
{{{
asgiref==3.3.4
certifi==2020.12.5
chardet==4.0.0
coverage==5.5
Django==3.2
django-registration-redux==2.9
idna==2.10
psycopg2==2.8.6
python-dotenv==0.15.0
pytz==2021.1
requests==2.25.1
selenium==3.141.0
sqlparse==0.4.1
typing-extensions==3.7.4.3
urllib3==1.26.4
}}}

Hope this bug may raise your interest !
Kind regards.
Fabrice"	Bug	closed	Testing framework	3.2	Normal	needsinfo	Posixpath Selenium		Unreviewed	0	0	0	0	0	0
