Example out of doc folder fails
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the example from the doc folder and start at notices_v1_red_get in interpol/api/default_api.py, following the traceback through api_client.py, model_utils.py, and model/red_notices.py. The work is done when the documented request no longer raises the reported TypeError and completes successfully.
Written by the indexing model from the issue text.
Description
Installed deutschland 0.3.0 and executed the example from the doc folder:
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 <module>
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'
- Dominant language
- Python
- Stars
- 16
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bundesAPI/interpol-api
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
bundesAPI/interpol-api#11 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
bundesAPI/interpol-api#10 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
bundesAPI/interpol-api#9 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
bundesAPI/interpol-api#8 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
bundesAPI/interpol-api#7 · 3 comments · 1 reaction ·
All issues in bundesAPI/interpol-api
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100