Trying to generate a Python client library,
swagger-codegen-cli.jar 2.3.1
java -jar swagger-codegen-cli generate -i /home/my_name/PycharmProjects/api/api.json -l python -o /home/my_name/test_api
Upload a result to Bitbacket git repository
Install module
test.py
`
import swagger_client
a = swagger_client.DefaultApi()
`
has error
File "/usr/local/lib/python3.5/dist-packages/swagger_client/__init__.py", line 19, in
from swagger_client.api.default_api import DefaultApi
File "/usr/local/lib/python3.5/dist-packages/swagger_client/api/__init__.py", line 6, in
from swagger_client.api.default_api import DefaultApi
ImportError: No module named 'swagger_client.api.default_api'
I have the same issue after generating a Python client library with the docker image of swagger-codegen-cli swaggerapi/swagger-codegen-cli.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/swagger_client/__init__.py", line 19, in <module>
from swagger_client.api.datastreams_api import DatastreamsApi
File "/usr/local/lib/python2.7/dist-packages/swagger_client/api/__init__.py", line 6, in <module>
from swagger_client.api.datastreams_api import DatastreamsApi
File "/usr/local/lib/python2.7/dist-packages/swagger_client/api/datastreams_api.py", line 21, in <module>
from swagger_client.api_client import ApiClient
File "/usr/local/lib/python2.7/dist-packages/swagger_client/api_client.py", line 27, in <module>
import swagger_client.models
File "/usr/local/lib/python2.7/dist-packages/swagger_client/models/__init__.py", line 28, in <module>
from swagger_client.models.parameter import Parameter
File "/usr/local/lib/python2.7/dist-packages/swagger_client/models/parameter.py", line 19, in <module>
from swagger_client.models.errorunknown import ERRORUNKNOWN # noqa: F401,E501
ImportError: No module named errorunknown
Is the issue probably fixed with #7684?
Most helpful comment
I have the same issue after generating a Python client library with the docker image of swagger-codegen-cli
swaggerapi/swagger-codegen-cli.Is the issue probably fixed with #7684?