You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to build a python swagger client for Elastic's ECE API
A test script that imports swagger_client errors with the following.
C:\Python27\python.exe C:/bench/ece/scripts/test-connection.py
Traceback (most recent call last):
File "C:/bench/ece/scripts/test-connection.py", line 3, in <module>
import swagger_client
File "build\bdist.win-amd64\egg\swagger_client\__init__.py", line 19, in <module>
File "build\bdist.win-amd64\egg\swagger_client\api\__init__.py", line 6, in <module>
File "build\bdist.win-amd64\egg\swagger_client\api\clusters_elasticsearch_api.py", line 21, in <module>
File "build\bdist.win-amd64\egg\swagger_client\api_client.py", line 27, in <module>
File "build\bdist.win-amd64\egg\swagger_client\models\__init__.py", line 32, in <module>
File "build\bdist.win-amd64\egg\swagger_client\models\bool_query.py", line 19, in <module>
File "build\bdist.win-amd64\egg\swagger_client\models\query_container.py", line 19, in <module>
ImportError: cannot import name BoolQuery
@tarp2699 , I am seeing the same thing with tag v3.0.10.
>>> import pycherwell
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pycherwell/__init__.py", line 19, in <module>
from pycherwell.api.business_object_api import BusinessObjectApi
File "pycherwell/api/__init__.py", line 6, in <module>
from pycherwell.api.business_object_api import BusinessObjectApi
File "pycherwell/api/business_object_api.py", line 21, in <module>
from pycherwell.api_client import ApiClient
File "pycherwell/api_client.py", line 27, in <module>
import pycherwell.models
File "pycherwell/models/__init__.py", line 18, in <module>
from pycherwell.models.action import Action
File "pycherwell/models/action.py", line 19, in <module>
from pycherwell.models.action import Action # noqa: F401,E501
ImportError: cannot import name Action
>>>
The content of pycherwell/models/action.py:
# coding: utf-8
"""
Cherwell Rest API
Unofficial Python Cherwell REST API library. # noqa: E501
OpenAPI spec version: 9.3.2
Contact: See AUTHORS.
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from pycherwell.models.action import Action # noqa: F401,E501
Python: 2.7.5
swagger-codegen-cli: 2.4.3-SNAPSHOT
it is likely something to do with package loader ... 🤔 💭
Description
Hi,
I'm trying to build a python swagger client for Elastic's ECE API
A test script that imports swagger_client errors with the following.
Swagger-codegen version
2.3.1
Swagger declaration file content or url
https://download.elasticsearch.org/cloud/1.1/elastic-cloud-enterprise-API-swagger.json
Command line used for generation
python
import swagger_client
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: