#32887: v3.2.4 regression - Invalid path type: PurePosixPath
----------------------------------------+------------------------
               Reporter:  Damien Allen  |          Owner:  nobody
                   Type:  Bug           |         Status:  new
              Component:  Utilities     |        Version:  3.2
               Severity:  Normal        |       Keywords:
           Triage Stage:  Unreviewed    |      Has patch:  0
    Needs documentation:  0             |    Needs tests:  0
Patch needs improvement:  0             |  Easy pickings:  0
                  UI/UX:  0             |
----------------------------------------+------------------------
 After upgrading from v3.2.3 to v3.2.4 the runserver command is now raising
 a TypeError and exiting. After reviewing the v3.2.4 release notes, I
 suspect that this is related to changes to template directory traversal
 since `get_template_directories()` is in the traceback:


 {{{
 Performing system checks...

 Traceback (most recent call last):
   File "manage.py", line 33, in <module>
     main()
   File "manage.py", line 29, in main
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/__init__.py", line 419, in
 execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/__init__.py", line 413, in execute
 System check identified no issues (0 silenced).
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/base.py", line 354, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/commands/runserver.py", line 61, in
 execute
     super().execute(*args, **options)
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/base.py", line 398, in execute
     output = self.handle(*args, **options)
   File "/usr/local/lib/python3.8/site-
 packages/channels/management/commands/runserver.py", line 65, in handle
     super().handle(*args, **options)
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/commands/runserver.py", line 96, in handle
     self.run(**options)
   File "/usr/local/lib/python3.8/site-
 packages/django/core/management/commands/runserver.py", line 103, in run
     autoreload.run_with_reloader(self.inner_run, **options)
   File "/usr/local/lib/python3.8/site-
 packages/django/utils/autoreload.py", line 638, in run_with_reloader
     start_django(reloader, main_func, *args, **kwargs)
   File "/usr/local/lib/python3.8/site-
 packages/django/utils/autoreload.py", line 623, in start_django
     reloader.run(django_main_thread)
   File "/usr/local/lib/python3.8/site-
 packages/django/utils/autoreload.py", line 328, in run
     autoreload_started.send(sender=self)
   File "/usr/local/lib/python3.8/site-
 packages/django/dispatch/dispatcher.py", line 180, in send
     return [
   File "/usr/local/lib/python3.8/site-
 packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
     (receiver, receiver(signal=self, sender=sender, **named))
   File "/usr/local/lib/python3.8/site-
 packages/django/template/autoreload.py", line 44, in
 watch_for_template_changes
     for directory in get_template_directories():
   File "/usr/local/lib/python3.8/site-
 packages/django/template/autoreload.py", line 21, in
 get_template_directories
     items.update(Path.cwd() / to_path(dir) for dir in backend.engine.dirs)
   File "/usr/local/lib/python3.8/site-
 packages/django/template/autoreload.py", line 21, in <genexpr>
     items.update(Path.cwd() / to_path(dir) for dir in backend.engine.dirs)
   File "/usr/local/lib/python3.8/site-packages/django/utils/_os.py", line
 58, in to_path
     raise TypeError('Invalid path type: %s' % type(value).__name__)
 TypeError: Invalid path type: PurePosixPath
 }}}


 ----

 Our Django is being run in a docker container (base image `python:3.8.6
 -slim-buster`) with WSL2 which could be related to funky path issues.

 Reverting to v3.2.3 resolves the issue.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32887>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/054.eb8de40217733c6459f86fcfe6fe62f9%40djangoproject.com.

Reply via email to