Closed kovmir closed 10 months ago
Fixed in just-released lastversion v3.4.4
Am I doing it wrong?
$ lastversion --version
lastversion 3.4.4, up to date
$ GITLAB_PA_TOKEN='mytoken' lastversion https://gitlab.com/librewolf-community/browser/appimage --verbose
lastversion.lastversion - INFO - Verbose 1 level output.
lastversion.ProjectHolder - INFO - Using cache directory: /home/uninstance/.cache/lastversion.
lastversion.ProjectHolder - INFO - Created instance of GitLabRepoSession
lastversion.GitLabRepoSession - INFO - Using Personal Access token.
lastversion.GitLabRepoSession - DEBUG - Checking if https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser%2Fappimage is repo
lastversion.GitLabRepoSession - DEBUG - Checking if https://gitlab.com/api/v4/projects/librewolf-community%2Fbrowser is repo
Traceback (most recent call last):
File "/home/uninstance/.local/bin/lastversion", line 8, in <module>
sys.exit(main())
File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/lastversion.py", line 842, in main
res = latest(
File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/lastversion.py", line 232, in latest
release = project.get_latest(pre_ok=pre_ok, major=repo_data.get("major", major))
File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/GitLabRepoSession.py", line 103, in get_latest
r = self.repo_query("/repository/tags")
File "/home/uninstance/.local/lib/python3.9/site-packages/lastversion/GitLabRepoSession.py", line 40, in repo_query
repo_enc = self.repo.replace("/", "%2F")
AttributeError: 'NoneType' object has no attribute 'replace'
@kovmir do you see a different output if you don't prefix your command with GITLAB_PA_TOKEN='mytoken'
?
I do, it works.
$ lastversion https://gitlab.com/librewolf-community/browser/appimage
120.0.1
Probably your GITLAB_PA_TOKEN
value is incorrect. Expired perhaps.
I have created one today with all permissions.
@kovmir I tried to follow your steps and the problem was unnecessary quoting of the token. It should be GITLAB_PA_TOKEN=TOKEN
and not GITLAB_PA_TOKEN='TOKEN'
Everything is fine, works even quoted (the quotes are for the shell).
I had a typo in my token string, I am sorry.
Project with incorrect version
https://gitlab.com/librewolf-community/browser/appimage/-/releases
To Reproduce
GITLAB_PA_TOKEN='mytoken' lastversion https://gitlab.com/librewolf-community/browser/appimage --verbose
Expected behavior
Latest release number, e.g. currently
120.0.1-1
.Program output