We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting "value should not be null" errors after posting a new project via the API following the documentation.
Code:
api_instance = kimai_python.ProjectApi(kimai_python.ApiClient(configuration)) body = kimai_python.ProjectEditForm('Test', 'Test', None, None, None, None, 1, 'd2d6de', 1) api_response = api_instance.api_projects_post(body)
Error: Traceback (most recent call last): File "taskhub.py", line 362, in start() File "taskhub.py", line 217, in start api_response = proj_instance.api_projects_post('Wipro - Ingredion', 'Wipro - Ingredion', None, None, None, None, 1, 'd2d6de', 1) TypeError: api_projects_post() takes 2 positional arguments but 10 were given (kimai-env) gooncal@ip-72-167-226-99:~/kimai_api$ python taskhub.py Traceback (most recent call last): File "taskhub.py", line 362, in start() File "taskhub.py", line 217, in start api_response = proj_instance.api_projects_post(obody) File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api/pro ject_api.py", line 748, in api_projects_post (data) = self.api_projects_post_with_http_info(body, **kwargs) # noqa: E501 File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api/pro ject_api.py", line 818, in api_projects_post_with_http_info collection_formats=collection_formats) File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api_cli ent.py", line 330, in call_api _preload_content, _request_timeout) File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api_cli ent.py", line 161, in __call_api _request_timeout=_request_timeout) File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api_cli ent.py", line 373, in request body=body) File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/rest.py ", line 275, in POST body=body) File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/rest.py ", line 228, in request raise ApiException(http_resp=r) kimai_python.rest.ApiException: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'Date': 'Sat, 15 Aug 2020 13:32:55 GMT', 'Server': 'Apache/2.4.18 (Ubuntu)', 'Cache-Control': 'max-age=0, must-revalidate , private', 'Expires': 'Sat, 15 Aug 2020 13:32:55 GMT', 'Set-Cookie': 'PHPSESSID =77m9g58k2kvuvr3u2cg5p0k7id; path=/; HttpOnly', 'Connection': 'close', 'Transfer -Encoding': 'chunked', 'Content-Type': 'application/json'}) HTTP response body: {"code":400,"message":"Validation Failed","errors":{"childre n":{"name":{},"comment":{},"orderNumber":{},"orderDate":{},"start":{},"end":{}," customer":{},"color":{},"budget":{"errors":["This value should not be null."]}," timeBudget":{"errors":["This value should not be null."]},"visible":{}}}}
The text was updated successfully, but these errors were encountered:
Hi,
this has been fixed in Kimai itself. Are you testing against the latest version?
#1
Best, Matthias
Sorry, something went wrong.
Version 0.2.9 was generated for the upcoming 1.10. Please try kimai-python 0.2.7 for Kimai 1.9.
Working now. Thanks!
No branches or pull requests
Getting "value should not be null" errors after posting a new project via the API following the documentation.
Code:
Error:
Traceback (most recent call last):
File "taskhub.py", line 362, in
start()
File "taskhub.py", line 217, in start
api_response = proj_instance.api_projects_post('Wipro - Ingredion', 'Wipro - Ingredion', None, None, None, None, 1, 'd2d6de', 1)
TypeError: api_projects_post() takes 2 positional arguments but 10 were given
(kimai-env) gooncal@ip-72-167-226-99:~/kimai_api$ python taskhub.py
Traceback (most recent call last):
File "taskhub.py", line 362, in
start()
File "taskhub.py", line 217, in start
api_response = proj_instance.api_projects_post(obody)
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api/pro ject_api.py", line 748, in api_projects_post
(data) = self.api_projects_post_with_http_info(body, **kwargs) # noqa: E501
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api/pro ject_api.py", line 818, in api_projects_post_with_http_info
collection_formats=collection_formats)
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api_cli ent.py", line 330, in call_api
_preload_content, _request_timeout)
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api_cli ent.py", line 161, in __call_api
_request_timeout=_request_timeout)
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/api_cli ent.py", line 373, in request
body=body)
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/rest.py ", line 275, in POST
body=body)
File "/home/gooncal/kimai-env/lib/python3.6/site-packages/kimai_python/rest.py ", line 228, in request
raise ApiException(http_resp=r)
kimai_python.rest.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Date': 'Sat, 15 Aug 2020 13:32:55 GMT', 'Server': 'Apache/2.4.18 (Ubuntu)', 'Cache-Control': 'max-age=0, must-revalidate , private', 'Expires': 'Sat, 15 Aug 2020 13:32:55 GMT', 'Set-Cookie': 'PHPSESSID =77m9g58k2kvuvr3u2cg5p0k7id; path=/; HttpOnly', 'Connection': 'close', 'Transfer -Encoding': 'chunked', 'Content-Type': 'application/json'})
HTTP response body: {"code":400,"message":"Validation Failed","errors":{"childre n":{"name":{},"comment":{},"orderNumber":{},"orderDate":{},"start":{},"end":{}," customer":{},"color":{},"budget":{"errors":["This value should not be null."]}," timeBudget":{"errors":["This value should not be null."]},"visible":{}}}}
The text was updated successfully, but these errors were encountered: