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

AssertionError: none #417

Open
oliverweinm opened this issue Jul 6, 2022 · 1 comment
Open

AssertionError: none #417

oliverweinm opened this issue Jul 6, 2022 · 1 comment
Assignees
Labels

Comments

@oliverweinm
Copy link

oliverweinm commented Jul 6, 2022

After installing pyup via pip and trying it out, I keep getting this AssertionError which is confusing as isinstance(base_url, str) shouldn't return None in this case.
Does anybody know why it comes to that and/or how to fix this? Both the repo String and the user-token String are valid, I double checked that already.

Thanks in advance guys

pyup --repo=oliverweinm/MCBDD2022 --user-token=<REDACTED_HERE> --initial
Traceback (most recent call last):
File "/usr/local/bin/pyup", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pyup/cli.py", line 50, in main
bot.update(branch=branch, initial=initial)
File "/usr/local/lib/python3.9/site-packages/pyup/bot.py", line 121, in update
self.configure(**kwargs)
File "/usr/local/lib/python3.9/site-packages/pyup/bot.py", line 106, in configure
repo=self.user_repo,
File "/usr/local/lib/python3.9/site-packages/pyup/bot.py", line 38, in user_repo
self._user_repo = self.provider.get_repo(token=self.user_token, name=self.repo_name)
File "/usr/local/lib/python3.9/site-packages/pyup/providers/github.py", line 40, in get_repo
return self._api(token).get_repo(name)
File "/usr/local/lib/python3.9/site-packages/pyup/providers/github.py", line 32, in _api
self.__api = Github(self.__token, base_url=self.url, timeout=50, verify=verify)
File "/usr/local/lib/python3.9/site-packages/github/MainClass.py", line 123, in init
assert isinstance(base_url, str), base_url
AssertionError: None

@yeisonvargasf
Copy link
Member

Hi, It should be fixed If you pass --provider_url https://api.github.com and --branch your_default_branch.

It's a bug and it will be fixed in the next PyUp version.

@yeisonvargasf yeisonvargasf self-assigned this Jul 22, 2022
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