Coder Social home page Coder Social logo

Alfred v4 support about alfred-gitlab HOT 9 CLOSED

lukewaite avatar lukewaite commented on June 11, 2024
Alfred v4 support

from alfred-gitlab.

Comments (9)

onedr0p avatar onedr0p commented on June 11, 2024 2

Ah, that did it. I use selfhosted as well and providing that /api/v4/projects seemed to work /shrug

Thanks for the help! Back to being productive :)

from alfred-gitlab.

onedr0p avatar onedr0p commented on June 11, 2024 1

Since it works fine for you, I will try to reinstall and leave feedback when I am done. Thanks for the quick response!

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 11, 2024

Are you able to provide more detail? I am running without issues on v4.0.6.

from alfred-gitlab.

onedr0p avatar onedr0p commented on June 11, 2024

Ok, still doesn't work for me.

When I type (for example) gl it keeps popping up telling me it's refreshing the repositories. This was working up until I installed Alfred v4, so I thought that was the issue...

See this gif...

https://imgur.com/a/XDn2y1t

Anyway I could view logs on what is happening?

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 11, 2024

Did you already configure your key with glsetkey?

You can run gl workflow:openlog and that should open logs for the background process in your Console.app.

from alfred-gitlab.

onedr0p avatar onedr0p commented on June 11, 2024

Yes I configured with the glset commands

Here are the error logs:

12:58:11 gitlab.py:35 INFO     Setting API Key
12:58:12 workflow.py:2266 ERROR    No JSON object could be decoded
Traceback (most recent call last):
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/workflow/workflow.py", line 2259, in run
    func(self)
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 41, in main
    projects = wf.cached_data('projects', wrapper, max_age=3600)
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/workflow/workflow.py", line 1890, in cached_data
    data = data_func()
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 39, in wrapper
    return get_projects(api_key, api_url)
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 10, in get_projects
    return get_project_page(api_key, url, 1, [])
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 22, in get_project_page
    result = list + r.json()
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/workflow/web.py", line 271, in json
    return json.loads(self.content, self.encoding or 'utf-8')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 352, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
12:58:15 update.py:13 INFO     Calling API page 1
12:58:16 workflow.py:2266 ERROR    No JSON object could be decoded
Traceback (most recent call last):
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/workflow/workflow.py", line 2259, in run
    func(self)
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 41, in main
    projects = wf.cached_data('projects', wrapper, max_age=3600)
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/workflow/workflow.py", line 1890, in cached_data
    data = data_func()
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 39, in wrapper
    return get_projects(api_key, api_url)
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 10, in get_projects
    return get_project_page(api_key, url, 1, [])
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/update.py", line 22, in get_project_page
    result = list + r.json()
  File "/Users/dbuhl001/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DE653CFA-3B2B-4694-9035-F748BAC353F5/workflow/web.py", line 271, in json
    return json.loads(self.content, self.encoding or 'utf-8')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 352, in loads
    return cls(encoding=encoding, **kw).decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded```

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 11, 2024

Are you using hosted GitLab, or are you self hosting?

If on hosted, can you please try glseturl https://gitlab.com/api/v4/projects? I am curious if perhaps the default has not loaded as I use a self-hosted version for work.. that could be the difference.

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 11, 2024

@onedr0p To clarify, had you previously called glseturl with just the hostname?

#10 suggested adding auto-detecting that missing, and adding it. Perhaps that is a worthwhile change to implement.

from alfred-gitlab.

onedr0p avatar onedr0p commented on June 11, 2024

Yes, I just had the hostname.

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.