#32978: Provide more informative error message on loaddata/dumpdata --format 
yaml
when PyYAML not installed
-------------------------------------+-------------------------------------
               Reporter:  Brad       |          Owner:  nobody
                   Type:             |         Status:  new
  Uncategorized                      |
              Component:  Core       |        Version:  3.2
  (Management commands)              |       Keywords:
               Severity:  Normal     |  serializers,yaml,dumpdata,loaddata
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 While the  docs at
 https://docs.djangoproject.com/en/3.2/topics/serialization/#serialization-
 formats do mention that PyYAML is required for the yaml serializer,
 `./manage.py dumpdata|loaddata --format yaml`, provides quite a sparse
 error message, "Unable to serialize database: module yaml not found" (from
 here:
 
https://github.com/django/django/blob/fbb1984046ae00bdf0b894a6b63294395da1cce8/django/core/management/commands/dumpdata.py#L245)
 if PyYAML is not installed.

 This could be especially confusing for new Django developers who are not
 aware that `yaml` is pointing to the PyYAML project on PyPI and is not a
 part of Django. Since yaml is the only one of the four serializers
 requiring an add-on third party package, it may be helpful to provide a
 more verbose error in this case.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32978>
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/055.2e3401480009e11740b26a41f2d43f8a%40djangoproject.com.

Reply via email to