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

Creation Error: Path Cannot Start With Slash #309

Open
meyersbs opened this issue Sep 21, 2022 · 0 comments
Open

Creation Error: Path Cannot Start With Slash #309

meyersbs opened this issue Sep 21, 2022 · 0 comments

Comments

@meyersbs
Copy link

meyersbs commented Sep 21, 2022

Similar to #293.

Error

When I run statuspage create --token=<token>, I get the following error:

/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Name: statuspage-test                             
Systems, eg (Website,API): SPORC-Cluster,KGCOE-GitLab,Mirrors,Documentation,OnDemand,Ticketing,Website,Grafana,Virtualization                                 
Deleting initial labels: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:01<00:00,  5.05it/s]
Creating status labels: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00,  4.87it/s]
Creating system labels: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:02<00:00,  4.23it/s]
Traceback (most recent call last):                
  File "/usr/local/bin/statuspage", line 8, in <module>
    sys.exit(cli())                               
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)             
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)                         
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx)) 
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/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/python3.8/dist-packages/statuspage/statuspage.py", line 257, in run_create
    repo.create_file(
  File "/usr/local/lib/python3.8/dist-packages/github/Repository.py", line 2090, in create_file
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/dist-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 422 {"message": "path cannot start with a slash", "errors": [{"resource": "Commit", "field": "path", "code": "invalid"}], "documentation_url": "https://docs.github.com/rest/reference/repos#create-or
-update-file-contents"}

I verified that the repo statuspage-test does not exist. The repo gets created, but is empty.

API Key

Checked Only:

  • public_repo
  • write:repo_hook

Versions

  • OS: Ubuntu 20.04 LTS
  • Python: 3.8.10
  • statuspage: 0.8.1
  • PyGithub: 1.55
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

1 participant