statuspage icon indicating copy to clipboard operation
statuspage copied to clipboard

Error during creating

Open aryoprakarsa opened this issue 6 years ago • 5 comments

I've an issue during creating statuspage on MacOSX

Traceback (most recent call last): File "/usr/local/bin/statuspage", line 10, in <module> sys.exit(cli()) File "/Library/Python/2.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/Library/Python/2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Library/Python/2.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Library/Python/2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Library/Python/2.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/Library/Python/2.7/site-packages/statuspage/statuspage.py", line 73, in update run_update(name=name, token=token, org=org) File "/Library/Python/2.7/site-packages/statuspage/statuspage.py", line 184, in run_update sha = repo.get_git_ref("heads/gh-pages").object.sha File "/Library/Python/2.7/site-packages/github/Repository.py", line 1907, in get_git_ref self.url + prefix + ref File "/Library/Python/2.7/site-packages/github/Requester.py", line 275, in requestJsonAndCheck return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url))) File "/Library/Python/2.7/site-packages/github/Requester.py", line 286, in __check raise self.__createException(status, responseHeaders, output) github.GithubException.GithubException: 409 {u'documentation_url': u'https://developer.github.com/v3/git/refs/#get-a-reference', u'message': u'Git Repository is empty.'}

Anyone could help is there anything can fix this issue ?

aryoprakarsa avatar Jul 20 '19 08:07 aryoprakarsa

UPDATED:

I was execute this command afte delete the existing repo and the result are:

Name: status Systems, eg (Website,API): Website, API Deleting initial labels: 100%|██████████| 9/9 [00:04<00:00, 2.20it/s] Creating status labels: 100%|██████████| 3/3 [00:01<00:00, 1.49it/s] Creating system labels: 100%|██████████| 2/2 [00:01<00:00, 1.96it/s] Traceback (most recent call last): File "/usr/local/bin/statuspage", line 10, in <module> sys.exit(cli()) File "/Library/Python/2.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/Library/Python/2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Library/Python/2.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Library/Python/2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Library/Python/2.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/Library/Python/2.7/site-packages/statuspage/statuspage.py", line 65, in create run_create(name=name, token=token, systems=systems, org=org, private=private) File "/Library/Python/2.7/site-packages/statuspage/statuspage.py", line 262, in run_create name=name File "/Library/Python/2.7/site-packages/github/Repository.py", line 1651, in create_file input=put_parameters File "/Library/Python/2.7/site-packages/github/Requester.py", line 275, in requestJsonAndCheck return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url))) File "/Library/Python/2.7/site-packages/github/Requester.py", line 286, in __check raise self.__createException(status, responseHeaders, output) github.GithubException.GithubException: 422 {u'documentation_url': u'https://developer.github.com/v3/repos/contents/#create-or-update-a-file', u'message': u'path cannot start with a slash', u'errors': [{u'field': u'path', u'code': u'invalid', u'resource': u'Commit'}]}

Still no luck

aryoprakarsa avatar Jul 20 '19 08:07 aryoprakarsa

I think I have the same error:

Deleting initial labels: 100%|##########| 9/9 [00:02<00:00,  3.43it/s]
Creating status labels: 100%|##########| 3/3 [00:01<00:00,  2.56it/s]
Creating system labels: 100%|##########| 3/3 [00:00<00:00,  3.10it/s]
Traceback (most recent call last):
  File "/usr/local/bin/statuspage", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/statuspage/statuspage.py", line 65, in create
    run_create(name=name, token=token, systems=systems, org=org, private=private)
  File "/usr/local/lib/python2.7/dist-packages/statuspage/statuspage.py", line 262, in run_create
    name=name
  File "/usr/local/lib/python2.7/dist-packages/github/Repository.py", line 1864, in create_file
    input=put_parameters,
  File "/usr/local/lib/python2.7/dist-packages/github/Requester.py", line 322, in requestJsonAndCheck
    verb, url, parameters, headers, input, self.__customConnection(url)
  File "/usr/local/lib/python2.7/dist-packages/github/Requester.py", line 345, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 422 {"documentation_url": "https://developer.github.com/v3/repos/contents/#create-or-update-a-file", "message": "path cannot start with a slash", "errors": [{"field": "path", "code": "invalid", "resource": "Commit"}]}

Chicken-DEV avatar Jan 15 '20 18:01 Chicken-DEV

I tried to create status page and have also encountered the same error!

pi@raspberrypi:~ $ statuspage create --token=HIDDEN
Name: mystatuspage
Systems, eg (Website,API): Website, CDN, API
Deleting initial labels: 100%|██████████| 9/9 [00:03<00:00,  2.62it/s]
Creating status labels: 100%|██████████| 3/3 [00:01<00:00,  2.27it/s]
Creating system labels: 100%|██████████| 3/3 [00:01<00:00,  2.27it/s]
Traceback (most recent call last):
  File "/home/pi/.local/bin/statuspage", line 10, in <module>
    sys.exit(cli())
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.local/lib/python2.7/site-packages/statuspage/statuspage.py", l                                                                                                                                   ine 65, in create
    run_create(name=name, token=token, systems=systems, org=org, private=private                                                                                                                                   )
  File "/home/pi/.local/lib/python2.7/site-packages/statuspage/statuspage.py", l                                                                                                                                   ine 262, in run_create
    name=name
  File "/home/pi/.local/lib/python2.7/site-packages/github/Repository.py", line                                                                                                                                    1864, in create_file
    input=put_parameters,
  File "/home/pi/.local/lib/python2.7/site-packages/github/Requester.py", line 3                                                                                                                                   22, in requestJsonAndCheck
    verb, url, parameters, headers, input, self.__customConnection(url)
  File "/home/pi/.local/lib/python2.7/site-packages/github/Requester.py", line 3                                                                                                                                   45, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 422 {"documentation_url": "https://devel                                                                                                                                   oper.github.com/v3/repos/contents/#create-or-update-a-file", "message": "path ca                                                                                                                                   nnot start with a slash", "errors": [{"field": "path", "code": "invalid", "resou                                                                                                                                   rce": "Commit"}]}

iamarya2k24 avatar Jan 21 '20 16:01 iamarya2k24

Looks like the github api updated and changed some things.

I PR'd my changes which got it working for me.

mrrsm avatar Jul 15 '20 19:07 mrrsm

@mrrsm great! will try it with your changes and report back.

Update: I moved on to another solution.

iamarya2k24 avatar Jul 16 '20 00:07 iamarya2k24