Coder Social home page Coder Social logo

Comments (10)

grantmcconnaughey avatar grantmcconnaughey commented on June 12, 2024

My GitLab access token shows as never being used:

image

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 12, 2024

@grantmcconnaughey This is a config issue - can you try glseturl https://gitlab.com/api/v4/projects

from alfred-gitlab.

grantmcconnaughey avatar grantmcconnaughey commented on June 12, 2024

I do see that in the README now! 🤦 Unfortunately, I'm getting the same result after that.

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 12, 2024

Do the log files still show it as a HTTP 400 error?

from alfred-gitlab.

grantmcconnaughey avatar grantmcconnaughey commented on June 12, 2024

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.

grantmcconnaughey avatar grantmcconnaughey commented on June 12, 2024

Removing the scheme fixed it!

glseturl gitlab.com/api/v4/projects

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 12, 2024

Well thats funky. I'll take a look, thanks!

from alfred-gitlab.

grantmcconnaughey avatar grantmcconnaughey commented on June 12, 2024

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.

ggydush-fn avatar ggydush-fn commented on June 12, 2024

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.

NvL-WEAP avatar NvL-WEAP commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.