Skip to content
New issue

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

KeyError: 'time_entry' #322

Closed
mohamedmamdouh1 opened this issue Jun 11, 2023 · 3 comments
Closed

KeyError: 'time_entry' #322

mohamedmamdouh1 opened this issue Jun 11, 2023 · 3 comments
Assignees
Labels

Comments

@mohamedmamdouh1
Copy link

Dears,

I'm trying to create time entry using API:

from redminelib import Redmine

redmine = Redmine('http://10.2.0.255/', username='admin', password='')
issue = redmine.issue.get(5)
time_entry = redmine.time_entry.create(issue_id=issue.id, hours=2, activity_id=8, comments='Worked on issue #1')

then I receive this error:
File "d:\test.py", line 47, in
time_entry = redmine.time_entry.create(issue_id=issue.id, hours=2, activity_id=8, comments='Worked on issue #1')
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\redminelib\managers\base.py", line 192, in create
resource = self._process_create_response(request, response)
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\redminelib\managers\base.py", line 206, in _process_create_response
return self.to_resource(response[self.container])
KeyError: 'time_entry'


Please note ERPmine plugin is installed (V4.7)

@maxtepkeev maxtepkeev self-assigned this Jun 11, 2023
@maxtepkeev
Copy link
Owner

Hi @mohamedmamdouh1

Please note ERPmine plugin is installed (V4.7)

This or any other 3rdparty plugin is most likely the reason. Have you tried to disable ERPmine and/or any other plugins that you have and see if that fixes the error ?

@mohamedmamdouh1
Copy link
Author

yes I tried and it works fine without the plugin (ERPmine), but I need to figure out why the API doesn't work while the plugin is installed.

@maxtepkeev
Copy link
Owner

This has nothing to do with python-redmine then and you should contact the plugin authors, most likely it's a bug on their side because normally a 3rdparty plugin shouldn't break compatibility of existing vanilla Redmine API endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants