Coder Social home page Coder Social logo

Comments (9)

SaschaKrug avatar SaschaKrug commented on June 12, 2024 5

What helped me as a temporary solution:

  1. Follow the guide to install python2: www.alfredapp.com
  2. Do python --version. Should be python 2.7
  3. Get the new path via which python. In my case it was /usr/local/bin/python
  4. Replace /usr/bin/python with the new path in the Alfred Workflow and inside the workflow folder. I needed to replace it inside of workflow/background.py and gitlab.py

Use the Alfred Workflow Debugger in the Preferences for assistance.

And yes, a new workflow would definitely be needed, but I don't have currently time to port it to python3. It looks like there are not even Alfred helpers for python3? That's weird ...

from alfred-gitlab.

lukewaite avatar lukewaite commented on June 12, 2024 3

Fixed thanks to @TribuneX in 3.0.0 which you may need to manually install if you're already on 12.3.

from alfred-gitlab.

GabLeRoux avatar GabLeRoux commented on June 12, 2024 1

/usr/bin/python was removed on macOS 12.3..

This leads to /bin/bash: python2: command not found when running the workflow with debug console open in alfred.

image

A possible workaround (definitely not the right solution, but works and good enough if you use it daily as I do) is to locate each occurrence of /usr/bin/python in the code and python in the and replace them with the path to an installation of python2.7 that you will manage by yourself.

It would definitely be preferable to update this workflow to python3 instead, but if you just want it to work, here are full steps. This assumes you have conda installed.

conda create -n alfred-gitlab python=2.7
conda activate alfred-gitlab
which python # this will give you the python path, mine gave me this:
# /Users/gableroux/miniconda/envs/alfred-gitlab/bin/python

Update these:

image

Example:

image

Open Alfred.alfredpreferences/workflows/user.workflow.D7406121-E5D3-438B-81D5-70FF7A9C58AC/ (path to the workflow files) and do a search and replace from /usr/bin/python to the new python path.

Here you go, shiny workflow again (manually altered, but good enough until this gets a proper fix).

image

from alfred-gitlab.

TribuneX avatar TribuneX commented on June 12, 2024 1

I upgraded this workflow to be compatible with python3 (with some help of @meinjens):
https://github.com/TribuneX/alfred-gitlab

I upgraded to a python3 compatible alfred-workflow version and replaced the old web.py with mureq. I'll see if I will open a PR here to get these changes included in this workflow.

from alfred-gitlab.

pat-s avatar pat-s commented on June 12, 2024 1

@TribuneX Awesome!

I've successfully used your fork to port alfred-gitea to Python3.
I was trying since a few days and struggling (as I am not a Python professional) but your forked got me going quickly.

🚀

from alfred-gitlab.

rtvenge avatar rtvenge commented on June 12, 2024 1

Thank you @TribuneX for updating and to @lukewaite for merging it in so quickly! This whole last week for me was gl foo… 🤦🏻 😆

from alfred-gitlab.

jankerli avatar jankerli commented on June 12, 2024

ths~

from alfred-gitlab.

pat-s avatar pat-s commented on June 12, 2024

See deanishe/alfred-workflow#97 and the patched fork at https://github.com/NorthIsUp/alfred-workflow-py3.

from alfred-gitlab.

mjhuber avatar mjhuber commented on June 12, 2024

if your main use case is searching for repos, i wrote a workflow that can be used until this excellent workflow is updated to support py3: https://github.com/mjhuber/alfred-gitlab

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.