django-rest-swagger icon indicating copy to clipboard operation
django-rest-swagger copied to clipboard

Error 'cannot find file' in newer version

Open mke21 opened this issue 7 years ago • 4 comments

Hi,

I upgraded from a very old version (0.3.6) of Django-rest-swagger to the newer version 2.1.2 and now I got a problem. The swagger site now produces an error: {"schemaValidationMessages":[{"level":"error","message":"Can't read from file https://localhost/apidocs/?format=openapi"}]}

Update: I have changed this ticket as I now partly understand why this problem occurs. It seems like django-swagger doesn't recognise that it should be using ssl (https). It tries to find the api-urls under http, which doesn't work of course. Then it produces this error. How can I force django-swagger to add https with the urls?

mke21 avatar Apr 10 '17 12:04 mke21

This issue is affecting my application as well. However, I'm seeing it happening locally, without using SSL at all. And if I just try to load the URL accused in the error message, it loads just fine for me. I think it's an issue with reading the content of the response.

P.S.: Not sure how relevant this is, but I'm using Python 3.6.

diogobaeder avatar May 16 '17 16:05 diogobaeder

You guys figure this out? I am experiencing the same thing, with Django 1.10.5

kinesii avatar Aug 18 '17 11:08 kinesii

Experiencing this over SSL as well (not publicly accessible). The file/URL that it claims can't be read from DOES load and the JSON is valid. I'm running: Django==1.11.9 djangorestframework==3.7.7 django-filter==1.1.0 django-rest-swagger==2.1.2 nose-parameterized==0.5.0 django-cors-headers==2.1.0 django-cors-middleware==1.3.1

brentstrange avatar Mar 08 '18 21:03 brentstrange

I'm using Django == 2.0 and django-rest-swagger == 2.1.2, facing the same problem.

ankittyagi20 avatar Mar 13 '18 12:03 ankittyagi20