#35085: Import of PyATS breaks built-in server
-----------------------------------------+------------------------
               Reporter:  bonzo81        |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Uncategorized  |        Version:  4.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              |
-----------------------------------------+------------------------
 When importing from the pyats library the development server fails to
 start with the following error. A more complete description of the issue
 in listed here
 https://github.com/CiscoTestAutomation/pyats/issues/120#issuecomment-892857620

 {{{
 Django version 4.2.8, using settings 'config.settings.local'
 Development server is running at http://0.0.0.0:8000/
 Using the Werkzeug debugger (https://werkzeug.palletsprojects.com/)
 Quit the server with CONTROL-C.
 Traceback (most recent call last):
   File "/app/manage.py", line 31, in <module>
     execute_from_command_line(sys.argv)
   File "/usr/local/lib/python3.11/site-
 packages/django/core/management/__init__.py", line 442, in
 execute_from_command_line
     utility.execute()
   File "/usr/local/lib/python3.11/site-
 packages/django/core/management/__init__.py", line 436, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python3.11/site-
 packages/django/core/management/base.py", line 412, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/usr/local/lib/python3.11/site-
 packages/django/core/management/base.py", line 458, in execute
     output = self.handle(*args, **options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-
 packages/django_extensions/management/utils.py", line 62, in inner
     ret = func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-
 packages/django_extensions/management/commands/runserver_plus.py", line
 338, in handle
     self.inner_run(options)
   File "/usr/local/lib/python3.11/site-
 packages/django_extensions/management/commands/runserver_plus.py", line
 438, in inner_run
     self.extra_files |= set(filter(lambda filename:
 str(filename).endswith('.mo'), gen_filenames()))
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-
 packages/django/utils/autoreload.py", line 304, in watched_files
     yield from iter_all_python_module_files()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-
 packages/django/utils/autoreload.py", line 120, in
 iter_all_python_module_files
     return iter_modules_and_files(modules, frozenset(_error_files))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 TypeError: unhashable type: 'Configuration'
 }}}

 I have used the python manage.py shell to test the import and do not get
 an error after import
 {{{
 Python 3.11.7 (main, Dec 19 2023, 03:30:20) [GCC 12.2.0]
 Type 'copyright', 'credits' or 'license' for more information
 IPython 8.19.0 -- An enhanced Interactive Python. Type '?' for help.

 In [1]: from pyats.topology import Testbed, Device

 In [2]:

 }}}

 As an aside, I found a similar issue reported but with the Netmiko library
 instead https://github.com/ktbyers/netmiko/issues/1955

 I don't think this has been reported previously. I have limited Python
 skills but happy to assist where I can.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35085>
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/0107018cd4af28e6-13a7f2de-9270-456e-8a2f-e6286ab58762-000000%40eu-central-1.amazonses.com.

Reply via email to