#31372: autoreload: dictionary changed size during iteration
-------------------------------------+-------------------------------------
               Reporter:  minusf     |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  2.2
  (Management commands)              |
               Severity:  Normal     |       Keywords:  autoreload
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Found this issue recently, not 100% reproducable. Not a huge project,
 actually a quite small one. macOS catalina, 10.15.3, python from brew
 (/usr/local/bin/python3) 3.7.7, Django 2.2.11, could not reproduce with
 3.0.4 in light testing, but maybe it's useful to have this stacktrace
 here. (can't move to 3 now because of dependencies btw).

 {{{
 2020-03-17 14:48:33,118 INFO: autoreload.py:597: Watching for file changes
 with WatchmanReloader
 Performing system checks...

 Traceback (most recent call last):
   File "manage.py", line 22, in <module>
     main()
   File "manage.py", line 18, in main
     execute_from_command_line(sys.argv)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/__init__.py", line 381, in
 execute_from_command_line
     utility.execute()
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/__init__.py", line 375, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/base.py", line 323, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/commands/runserver.py", line 60, in
 execute
     super().execute(*args, **options)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/base.py", line 364, in execute
     output = self.handle(*args, **options)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/commands/runserver.py", line 95, in handle
     self.run(**options)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/core/management/commands/runserver.py", line 102, in run
     autoreload.run_with_reloader(self.inner_run, **options)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 598, in run_with_reloader
     start_django(reloader, main_func, *args, **kwargs)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 583, in start_django
     reloader.run(django_main_thread)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 301, in run
     self.run_loop()
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 307, in run_loop
     next(ticker)
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 520, in tick
     self.update_watches()
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 493, in update_watches
     self._update_watches()
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 476, in _update_watches
     watched_files = list(self.watched_files(include_globs=False))
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 262, in watched_files
     yield from iter_all_python_module_files()
   File "/Users/user/src/venv/lib/python3.7/site-
 packages/django/utils/autoreload.py", line 101, in
 iter_all_python_module_files
     modules_view = sorted(list(sys.modules.items()), key=lambda i: i[0])
 RuntimeError: dictionary changed size during iteration
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31372>
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/049.9f451aab77463806c51358058c751285%40djangoproject.com.

Reply via email to