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

confluence.update_or_create shows exception in log when page is not existent #159

Closed
vzabawski opened this issue Feb 28, 2019 · 3 comments
Closed

Comments

@vzabawski
Copy link

I'm creating a Confluence page using confluence.update_or_create function and it shows list index out of range in output. Seems like the exception occurs when page is not exist and should be created. This error is a bit confusing because page is being created without any problems, so this error doesn't actually indicate something went wrong.

DEBUG:atlassian:curl --silent -X GET -u 'confluence_user':'********' -H 'Content-Type: application/json' -H 'Accept: application/json'  'https://confluence.example.com/rest/api/content/123833032?expand=space'
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): confluence.example.com:443
DEBUG:urllib3.connectionpool:https://confluence.example.com:443 "GET /rest/api/content/123833032?expand=space HTTP/1.1" 200 None
DEBUG:atlassian:Received: 200
 {'id': '123833032', 'type': 'page', 'status': 'current', 'title': 'KB pages', 'space': {'id': 68452369, 'key': '~confluence_user', 'name': 'User, Confluence', 'type': 'personal', '_expandable': {'metadata': '', 'icon': '', 'description': '', 'homepage': '/rest/api/content/69927984'}, '_links': {'self': 'https://confluence.example.com/rest/api/space/~confluence_user', 'webui': '/spaces/viewspace.action?key=~confluence_user'}}, 'extensions': {'position': 'none'}, '_expandable': {'container': '/rest/api/space/~confluence_user', 'metadata': '', 'operations': '', 'children': '/rest/api/content/123833032/child', 'restrictions': '/rest/api/content/123833032/restriction/byOperation', 'history': '/rest/api/content/123833032/history', 'ancestors': '', 'body': '', 'version': '', 'descendants': '/rest/api/content/123833032/descendant'}, '_links': {'self': 'https://confluence.example.com/rest/api/content/123833032', 'base': 'https://confluence.example.com', 'context': '', 'collection': '/rest/api/content', 'webui': '/display/~confluence_user/KB+pages', 'edit': '/pages/resumedraft.action?draftId=123833032&draftShareId=39e02a1e-4681-4204-a438-b90ec259f650', 'tinyui': '/x/yIthBq'}}
DEBUG:atlassian:curl --silent -X GET -u 'confluence_user':'********' -H 'Content-Type: application/json' -H 'Accept: application/json'  'https://confluence.example.com/rest/api/content'
DEBUG:urllib3.connectionpool:https://confluence.example.com:443 "GET /rest/api/content?spaceKey=~confluence_user&title=example_confluence_page HTTP/1.1" 200 None
DEBUG:atlassian:Received: 200
 {'results': [], 'start': 0, 'limit': 25, 'size': 0, '_links': {'base': 'https://confluence.example.com', 'context': '', 'self': 'https://confluence.example.com/rest/api/content?spaceKey=~confluence_user&title=example_confluence_page'}}
ERROR:atlassian.confluence:list index out of range
INFO:atlassian.confluence:Page does not exist because did not find by title search
@gonchik
Copy link
Member

gonchik commented Mar 1, 2019

Hi!
Thanks I will see it.

Cheers,
Gonchik Tsymzhitov

@gonchik
Copy link
Member

gonchik commented Jun 18, 2019

Hi @vzabawski !

Sorry, I can't reproduce it that error.
During other PR it was fixed

@gonchik gonchik closed this as completed Jun 18, 2019
@asifiqbal
Copy link

I am still seeing this error when I run this

confluence.create_page(space, title='MyPage', body='this is a new page', parent_id=None, type='page', representation='storage', editor='v2')

Can't find 'MyPage' page on the https://example.org/confluence!

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

No branches or pull requests

3 participants