Jump to content

vitor

Staff
  • Posts

    8,523
  • Joined

  • Last visited

  • Days Won

    711

Posts posted by vitor

  1. 6 hours ago, Alfred-Chris said:

    But (it seems) since the latest MacOS update I get the error message

     

    If you’re on Monterey 12.3, you’ll need further fixes.

    1. Reinstall Python 2.
    2. Redownload and reinstall the Workflow, to regain the executable bit.
    3. Open the Workflow in the Finder.
    4. Locate the save_attachments.py file and open it in a text editor.
    5. Change the top line from #!/usr/bin/python to (if you are on an Intel Mac) #!/usr/local/bin/python or (if you are on Apple Silicon) #!/opt/homebrew/bin/python.
  2. On 3/28/2022 at 1:34 PM, gingerbeardman said:

    And then change all script filters in the workflow to call /usr/local/bin/python rather than just python.

     

    That won’t work for people on Apple Silicon. The more versatile option is to prepend export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}" and then call python (no full path). Like so (linked removed because fix was added officially).

  3. 6 minutes ago, Acidham said:

    `code` does not work

     

    Sure it does. I have been using it for almost a decade, as has every other user of the Workflow. If it’s not working for you, check the debugger. You know how this works—if you don’t give me any information on what you’re doing and what’s happening, there’s no way for me to help you.

     

    The Workflow makes the conversion using the correct BBCode tags; the result os only visible when previewing or submitting the post.

  4. 1 hour ago, Acidham said:

    but shebangs in python2 workflows are set to #!/usr/bin/env python which points to /usr/bin/python


    env points to whatever is in your environment; that’s the point of using it instead of a full path. It’s why export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}" works, as I’ve explained. And that’s why these Workflows need tweaks. @m4Aark pointed you to the updated version, the instructions above are correct.

     

    1 hour ago, Acidham said:

    how can I format code lines in the forum here?


    There’s no setting for it, I auto-stylise them via MarkdownTransform.

  5. 4 hours ago, Acidham said:

    is not permitted due to Apple's SIP


    You’re supposed to install the symlink in ${HOMEBREW_PREFIX}/bin/python, not /usr/bin/python.

     

    @m4Aark correctly mentioned that above. Though they did not mention two important steps which may be necessary first: export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}" and eval "$(brew shellenv)". These are all covered in the KB article.

  6. On 3/26/2022 at 3:09 PM, gloogloo said:

    If someone could help with the Pocket for Alfred workflow that would be awesome.

     

    Added.

     

    2 hours ago, milopus said:

    I went to the link to remove everything and with the first command, this is what I got:

     

    Not a problem, continue with the reinstallation.

     

    1 hour ago, pankajsz said:

    https://github.com/deanishe/alfred-fixum -- pls help with updated version of this

     

    What’s the use case? A Workflow which would need that fix is unlikely to work without modification anyway, and I’m already applying the fix to the updates I’m making. In other words, for that Workflow to be useful to you, you need to know how to fix it.

  7. 22 hours ago, xilopaint said:

    I’m finishing the work with Alfredeanishe

     

    That’s a nice gesture, but do make sure he’s OK with it. What we know is an homage can be perceived by others as an endorsement. I have no idea what Dean’s thoughts are on the matter, but I know mine. Sometimes people really want to show their appreciation and that is touching, but to me it is important that I don’t seem to be involved with something I’m not.

     

    23 hours ago, xilopaint said:

    I think now we should drop Alfred 2 support and moving forward.

     

    Definitely!

     

    23 hours ago, xilopaint said:

    One of the last issues I’m still facing is regarding the notify module.

     

    In the meantime, you can just show a Notification via AppleScript. It won’t have a custom icon, but everything else will work.

     

    23 hours ago, xilopaint said:

    I suspect PyObjC was embedded with Python 2 in macOS versions earlier than12.3

     

    Yep.

     

    23 hours ago, xilopaint said:

    other solution would be using something like Notificator.

     

    Notificator needs to be built in advance, for the icon. Though I could change it so it’s built on-demand and cached. I’ll have a thought about that.

     

    8 hours ago, Acidham said:

    but I decided to give it up and switch to Python 3 completely.

     

    That’s the right choice and what I expected you’d do. I frequently mention you when pointing to developers who were already making Python3 Workflows before the removal.

     

    8 hours ago, Acidham said:

    A goblin gave me the magic script some time ago

     

    That is needlessly complex. All you need is export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}". That single line will make calls to python3 use a Homebrew-installed Python if it exists, or /usr/bin/python3 if it doesn’t. If the user doesn’t have the latter either, macOS will take care of it by showing users a GUI to install it in two clicks.


    It’s not that env isn’t working, it’s that env checks PATH, and Alfred uses the default. That’s why that single line solves it all.

  8. And I’m happy to report the list isn’t only growing, but shrinking as well! When a Workflow is officially updated, it’s removed from the table. In the past three days, that has happened four times. Some of them have non-Python 2 alternatives listed, but that column was only added three days ago so it has plenty of room to expand (submissions welcome!).

     

    @CandiceJoy To answer your Python 3 question from a developer perspective, the simple answer is that the Python team broke compatibility from version 2 to 3. It’s largely considered a botched transition which took over a decade to complete and is still felt, to the point the creator of Python has publicly stated there may never be a Python 4.

  9. 1 hour ago, milopus said:

    I tried reinstalling 2.7.18 and got this message

     

    How did you try to reinstall?


    Restart your computer, then remove everything and follow the instructions to reinstall Python 2 again. Paste the Terminal output here, with the commands.

     

    23 minutes ago, gillibrand said:

    hadn't touched this in years, but I finally updated it for python3.

     

    It’s already on the list as an alternative to another Workflow.

  10. 2 hours ago, giovanni said:

    you need to pass the output in the right JSON format

     

    Note @mmm is using a Run Script, not a Script Filter. The emoji will be directly output to the next object, it’s not going to be shown in Alfred.

     

    4 hours ago, mmm said:

    so I don't know if the lines too long or one of the emojis is an illegal character or something.

     

    Something of that order is likely. Try removing emojis until it works (and thus you find the culprit) or quoting them:

     

    EMOJIS=('😺' '😸' '😹' '😻' '😼' '😽' '🙀' '😿' '😾')

     

×
×
  • Create New...