Comments (10)
My GitLab access token shows as never being used:
from alfred-gitlab.
@grantmcconnaughey This is a config issue - can you try glseturl https://gitlab.com/api/v4/projects
from alfred-gitlab.
I do see that in the README now! 🤦 Unfortunately, I'm getting the same result after that.
from alfred-gitlab.
Do the log files still show it as a HTTP 400 error?
from alfred-gitlab.
Nope, looks like they did change. It doesn't recognize the scheme (https?):
15:17:31 background.py:285 ERROR [__workflow_update_check] command failed with status 1
15:17:31 update.py:12 INFO Calling API page 1
15:17:31 workflow.py:2114 ERROR ('unrecognized scheme', '')
Traceback (most recent call last):
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/workflow/workflow.py", line 2107, in run
func(self)
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/update.py", line 38, in main
projects = wf.cached_data('projects', fetch_gitlab_projects, max_age=3600)
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/workflow/workflow.py", line 1723, in cached_data
data = data_func()
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/update.py", line 36, in fetch_gitlab_projects
return get_projects(api_key, api_url)
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/update.py", line 8, in get_projects
return get_project_page(api_key, url, 1, [])
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/update.py", line 13, in get_project_page
response = mureq.get(url, params=({'private_token': api_key, 'per_page': 100, 'page': page, 'membership': 'true'}))
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/mureq.py", line 52, in get
return request('GET', url=url, **kwargs)
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/mureq.py", line 40, in request
with yield_response(method, url, **kwargs) as response:
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/mureq.py", line 124, in yield_response
url, conn, path = _prepare_request(method, url, enc_params=enc_params, timeout=timeout, unix_socket=unix_socket, verify=verify, source_address=source_address, ssl_context=ssl_context)
File "~/Alfred.alfredpreferences/workflows/user.workflow.78188B4B-A351-4C3D-A3EE-1A1732DD54AF/mureq.py", line 351, in _prepare_request
raise ValueError("unrecognized scheme", scheme)
ValueError: ('unrecognized scheme', '')
from alfred-gitlab.
Removing the scheme fixed it!
glseturl gitlab.com/api/v4/projects
from alfred-gitlab.
Well thats funky. I'll take a look, thanks!
from alfred-gitlab.
You bet! Thanks for rubber duckin' with me. I'll leave it up to you whether to close now or close after addressing the scheme issue. Cheers.
from alfred-gitlab.
Also having problems here, but logs show the following with glseturl https://gitlab.com/api/v4/projects
mureq.HTTPErrorStatus: HTTP response returned error code 401
When I change the URL to my actual URL (https://gitlab.companyname.net/api/v4/projects
) I get the following:
Traceback (most recent call last):
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/workflow/workflow.py", line 2107, in run
func(self)
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/update.py", line 38, in main
projects = wf.cached_data('projects', fetch_gitlab_projects, max_age=3600)
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/workflow/workflow.py", line 1723, in cached_data
data = data_func()
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/update.py", line 36, in fetch_gitlab_projects
return get_projects(api_key, api_url)
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/update.py", line 8, in get_projects
return get_project_page(api_key, url, 1, [])
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/update.py", line 20, in get_project_page
projects = stored_projects + response.json()
File "/Users/ggydush/Documents/Alfred.alfredpreferences/workflows/user.workflow.15193ABD-CE38-4CAF-8D43-D52082DC68CD/mureq.py", line 191, in json
return jsonlib.loads(self.body)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
from alfred-gitlab.
Same here, i thought this workflow wasn't working with alfred 4 due the "Quickly navigate to GitLab projects in Alfred 3" in the readme.
Works fine with the URL https://mygitlab.x/api/v4/projects
from alfred-gitlab.
Related Issues (20)
- Feature idea: automatically append '/api/v4/projects' to the URL if not present HOT 1
- Add a way to go directly to the categories of the project (Issues, Merge Request,...) HOT 2
- Opening a project with quick_open set to false fails on first time HOT 1
- projects don't get retrieved (openssl errors)
- Support gitlab issue board HOT 1
- Alfred v4 support HOT 9
- Does it support enterprise edition? HOT 1
- Not fetching any gitlab projects projects => update.py gives HTTP Error 308 permanent redirect HOT 1
- ModuleNotFoundError: No module named 'cPickle' HOT 5
- MacOS 12.3 can not use this plugin, how to resolve? HOT 9
- There is no gl keyword HOT 2
- Why do I have no items when I configure token and URL prompt
- alfred-gitlab not working on macOS 13.0 after upgrade HOT 1
- why select gl error in workflow gitlab
- Thanks
- Repositories not getting refreshed
- use modifier key to replace environment variable
- Add some debugging options for 'when it doesn't work'
- glsetkey needed quotes around the token HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alfred-gitlab.