Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError raised when using DRF 3.7.3. #44

Closed
h-hirokawa opened this issue Jan 12, 2018 · 1 comment
Closed

ImportError raised when using DRF 3.7.3. #44

h-hirokawa opened this issue Jan 12, 2018 · 1 comment
Labels
bug Bug report/fix

Comments

@h-hirokawa
Copy link
Contributor

import drf_yasg.generators raises following ImportError when the version of Django Rest Framework is 3.7.3.

/usr/lib/python3.6/site-packages/drf_yasg/generators.py in <module>()
      7 from django.utils.encoding import force_text
      8 from rest_framework import versioning
----> 9 from rest_framework.compat import URLPattern, URLResolver, get_original_route
     10 from rest_framework.schemas.generators import EndpointEnumerator as _EndpointEnumerator
     11 from rest_framework.schemas.generators import SchemaGenerator, endpoint_ordering

ImportError: cannot import name 'URLPattern'

To solve this, you must use DRF>=3.7.4.

@axnsan12
Copy link
Owner

Oops. Right, thanks for the report.

@axnsan12 axnsan12 added the bug Bug report/fix label Aug 6, 2018
PaulWay pushed a commit to PaulWay/drf-yasg that referenced this issue Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report/fix
Projects
None yet
Development

No branches or pull requests

2 participants