title: TypeError: connect() argument 4 must be str, not WindowsPath . /*The Error that i m getting in my simple login django project*/
body: <pre><code>System check identified no issues (0 silenced).
  
  You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
  Run 'python manage.py migrate' to apply them.
  February 17, 2021 - 19:52:27
  Django version 3.1.6, using settings 'felix.settings'
  Starting development server at http://127.0.0.1:8000/
  Quit the server with CTRL-BREAK.
  C:\Users\FELIX\OneDrive\Desktop\Projects\django login2\felix\felix\settings.py changed, reloading.
  Watching for file changes with StatReloader
  Performing system checks...
  
  System check identified no issues (0 silenced).
  Exception in thread django-main-thread:
  Traceback (most recent call last):
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\threading.py&quot;, line 950, in _bootstrap_inner
      self.run()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\threading.py&quot;, line 888, in run
      self._target(*self._args, **self._kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\autoreload.py&quot;, line 53, in wrapper
      fn(*args, **kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\commands\runserver.py&quot;, line 121, in inner_run
      self.check_migrations()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\core\management\base.py&quot;, line 459, in check_migrations
      executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\migrations\executor.py&quot;, line 18, in __init__
      self.loader = MigrationLoader(self.connection)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\migrations\loader.py&quot;, line 53, in __init__
      self.build_graph()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\migrations\loader.py&quot;, line 216, in build_graph
      self.applied_migrations = recorder.applied_migrations()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\migrations\recorder.py&quot;, line 77, in applied_migrations
      if self.has_table():
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\migrations\recorder.py&quot;, line 55, in has_table
      with self.connection.cursor() as cursor:
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\asyncio.py&quot;, line 26, in inner
      return func(*args, **kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\base\base.py&quot;, line 259, in cursor
      return self._cursor()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\base\base.py&quot;, line 235, in _cursor
      self.ensure_connection()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\asyncio.py&quot;, line 26, in inner
      return func(*args, **kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\base\base.py&quot;, line 219, in ensure_connection
      self.connect()
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\asyncio.py&quot;, line 26, in inner
      return func(*args, **kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\base\base.py&quot;, line 200, in connect
      self.connection = self.get_new_connection(conn_params)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\asyncio.py&quot;, line 26, in inner
      return func(*args, **kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\django\db\backends\mysql\base.py&quot;, line 234, in get_new_connection
      return Database.connect(**conn_params)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\MySQLdb\__init__.py&quot;, line 130, in Connect
      return Connection(*args, **kwargs)
    File &quot;C:\Users\FELIX\AppData\Local\Programs\Python\Python39\lib\site-packages\MySQLdb\connections.py&quot;, line 185, in __init__
      super().__init__(*args, **kwargs2)
  TypeError: connect() argument 4 must be str, not WindowsPath
  </code></pre>