bundesAPI / bundesAPI/interpol-api

Example out of doc folder fails

Abierto
#6 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
16
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Installed deutschland 0.3.0 and executed the example from the doc folder:
```python
import time
from deutschland import interpol
from deutschland.interpol.api import default_api
from deutschland.interpol.model.red_notices import RedNotices
from pprint import pprint
# Defining the host is optional and defaults to https://ws-public.interpol.int
# See configuration.py for a list of all supported configuration parameters.
configuration = interpol.Configuration(
host = "https://ws-public.interpol.int"
)

# Enter a context with an instance of the API client
with interpol.ApiClient() as api_client:
# Create an instance of the API class
api_instance = default_api.DefaultApi(api_client)
forename = "MAX" # str | First name (optional)
name = "Mustermann" # str | Last name (optional)
nationality = "DE" # str | Two digit country code (optional)
age_max = 120 # int | maximum age (optional)
age_min = 18 # int | minimum age (optional)
free_text = "" # str | Free text query (optional)
sex_id = "F" # str | Free text query (optional)
arrest_warrant_country_id = "DE" # str | Two digit country code (optional)
page = 1 # int | pagination - starts with 1 (optional)
result_per_page = 200 # int | resultPerPage (optional)

# example passing only required values which don't have defaults set
# and optional values
try:
# Get Red Notices
api_response = api_instance.notices_v1_red_get(forename=forename, name=name, nationality=nationality, age_max=age_max, age_min=age_min, free_text=free_text, sex_id=sex_id, arrest_warrant_country_id=arrest_warrant_country_id, page=page, result_per_page=result_per_page)
pprint(api_response)
except interpol.ApiException as e:
print("Exception when calling DefaultApi->notices_v1_red_get: %s\n" % e)

```

```
Traceback (most recent call last):
File "main.py", line 32, in
api_response = api_instance.notices_v1_red_get(forename=forename, name=name, nationality=nationality, age_max=age_max, age_min=age_min, free_text=free_text, sex_id=sex_id, arrest_warrant_country_id=arrest_warrant_country_id, page=page, result_per_page=result_per_page)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/api/default_api.py", line 263, in notices_v1_red_get
return self.notices_v1_red_get_endpoint.call_with_http_info(**kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/api_client.py", line 950, in call_with_http_info
return self.api_client.call_api(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/api_client.py", line 432, in call_api
return self.__call_api(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/api_client.py", line 236, in __call_api
return_data = self.deserialize(response_data, response_type, _check_type)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/api_client.py", line 344, in deserialize
deserialized_data = validate_and_convert_types(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 1607, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 1468, in attempt_convert_item
return deserialize_model(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 1378, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 48, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 358, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 48, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model/red_notices.py", line 202, in _from_openapi_data
setattr(self, var_name, var_value)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 179, in __setattr__
self[attr] = value
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 496, in __setitem__
self.set_attribute(name, value)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 155, in set_attribute
value = validate_and_convert_types(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 1607, in validate_and_convert_types
converted_instance = attempt_convert_item(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 1468, in attempt_convert_item
return deserialize_model(
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 1378, in deserialize_model
return model_class._new_from_openapi_data(**kw_args)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 48, in wrapped_init
return fn(_self, *args, **kwargs)
File "/home/raphael/.cache/pypoetry/virtualenvs/deutschland-test-pypi-tmto6Anq-py3.8/lib/python3.8/site-packages/deutschland/interpol/model_utils.py", line 358, in _new_from_openapi_data
return cls._from_openapi_data(*args, **kwargs)
TypeError: wrapped_init() got multiple values for argument '_self'

```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.