Closed querkmachine closed 2 years ago
We’ll that could def be the problem!!! It’s on my todo list to look at this. There is just so much other stuff going on. Maybe I can take a look this evening
Sent from my iPhone
On Jan 31, 2022, at 2:53 AM, Kimberly Grey @.***> wrote:
Emoji Taco v1.2.3 — macOS 12.3 beta.
I've just updated to the macOS 12.3 beta that dropped a couple of days ago (I live dangerously) and Emoji Taco no longer works. No errors or glitches, anything after the initial Alfred keywords (aka, involves running a python script) just doesn't work.
My assumption is that this is because macOS 12.3 removes the bundled version of Python 2 (something Apple apparently said they were going to do in 2019). Bit weird of them to do that in a minor release, but that's Apple for ya.
Just giving a head's up in case no one has pointed this out yet!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
So I'm on 12.1
What do you have for python --version
?
I'm assuming 2 possible things:
So obviously Python3 isn't playing nice yet with the "stuff" ...
Running python --version
returns "command not found", which seems consistent with it having been removed.
I do have Python 3 installed (python3 --version
returns 3.8.9), though my understanding (as per the article linked in the initial issue) is that this is only going to be true for people with Xcode installed, and it isn't enabled otherwise.
So you are saying that out of the box the latest beta doesn't have any python? Or only has python3? I mean that's going to be a huger Alfred issue all together...
So I'm using this library: https://github.com/deanishe/alfred-workflow which hasn't been updated to Python3.... but I'm still confused about the beta osx situation with which python is available
Not sure if this would help. But have a look. https://github.com/NorthIsUp/alfred-workflow-py3
Please see https://www.alfredapp.com/help/kb/python-2-monterey/
Installing python 2 via these instructions still results in "python: command not found" errors in the debugging console for the workflow.
Changing "python" in the three script filters to "/usr/local/bin/python" (i.e. to hardcode the newly Homebrew-installed python 2.7 binary) gives this set of errors:
[00:36:12.287] ERROR: Emoji Taco[Script Filter] Code 1: .
00:36:12 workflow.py:2055 DEBUG ---------- Emoji Taco (1.2.3) ----------
00:36:12 workflow.py:1663 DEBUG saved data: /Users/ilikepeaches/Library/Application Support/Alfred/Workflow Data/org.jeef.emoji/download_percent.cpickle
00:36:12 workflow.py:1663 DEBUG saved data: /Users/ilikepeaches/Library/Application Support/Alfred/Workflow Data/org.jeef.emoji/phase.cpickle
00:36:12 workflow.py:1663 DEBUG saved data: /Users/ilikepeaches/Library/Application Support/Alfred/Workflow Data/org.jeef.emoji/emoji_count.cpickle
00:36:12 background.py:233 DEBUG [bg] command cached: /Users/ilikepeaches/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/org.jeef.emoji/bg.argcache
00:36:12 background.py:237 DEBUG [bg] passing job to background runner: [u'/usr/bin/python', '/Users/ilikepeaches/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DC274ADB-8DD2-4A6E-B666-01417B55E331/src/workflow/background.pyc', 'bg']
00:36:12 workflow.py:2074 ERROR [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Users/ilikepeaches/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DC274ADB-8DD2-4A6E-B666-01417B55E331/src/workflow/workflow.py", line 2067, in run
func(self)
File "src/downloadDataFiles.py", line 83, in main
run_in_background('bg', ['/usr/bin/python', wf.workflowfile('src/bg_downloader.py')])
File "/Users/ilikepeaches/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DC274ADB-8DD2-4A6E-B666-01417B55E331/src/workflow/background.py", line 238, in run_in_background
retcode = subprocess.call(cmd)
File "/Users/ilikepeaches/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/Users/ilikepeaches/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/Users/ilikepeaches/.pyenv/versions/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Looks like the background download script is still calling /usr/bin/python
... I'm just a bunch of versions behind on the Mac .... hopefully the next version of Alfred will come out soon. I'll look into this but it could be the underlying lib I'm using that is providing python stuff. I tried the py3 upgrade on it and it didn't go as planned....
I got it mostly working by
Init Emoji says that it parses 2,243 emoji, and many searches work as expected:
but there are some obvious ones now missing?
Hmm.
I don't see anything in the debug output that stands out.
Ah. I see that the no-peach issue is a separate one: https://github.com/jeeftor/EmojiTaco/issues/24
@jeeftor Go into your three script filters and make the first line:
export PATH="/opt/homebrew/bin:/usr/local/bin:${PATH}"
That won’t make a difference to anyone using the Workflow now, and for people who are on Monterey 12.3 and followed the knowledge base article, it will work as well.
Unfortunately, that updated PATH won't fix the workflow by itself because several hardcoded references to /usr/bin/python remain:
@jeeftor if you add the PATH to the script filters per @vitorgalvao and change each of those seven '/usr/bin/python' instances to just 'python' (you don't want to hardcode e.g. /usr/local/bin/python because Homebrew only installs in that location on Intel; on M1 the binary will be at /opt/homebrew/bin/python), then the script works, https://github.com/jeeftor/EmojiTaco/issues/24 notwithstanding.
just installed 12.3. sacrebleu. missing my tacos emojis.
edit: this was supposed to contain the frown emoji but hey. edit2: many stuff on my machine are broken now and i fork and update them myself to Python3 but this one is :grimace:
Sorry guys -> I've been way behind working on other projects... :(
And my version keeps working and working... (so its hard to debug this stuff)
On Tue, Mar 15, 2022 at 4:42 AM G. @.***> wrote:
just installed 12.3. sacrebleu. missing my tacos emojis.
— Reply to this email directly, view it on GitHub https://github.com/jeeftor/EmojiTaco/issues/27#issuecomment-1067831340, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQ4XZ2Z5R5NNUW4ZTK4RDVABSS7ANCNFSM5NFYRRVQ . You are receiving this because you were mentioned.Message ID: @.***>
And my version keeps working and working... (so its hard to debug this stuff)
There’s nothing to debug; it’s not a problem with your code but with the tooling it relies on. The Workflow will break for everyone on 12.3—including you—because the Python runtime is no longer present. For the Workflow to keep working you’ll have to either do the changes I and @ilikepeaches pointed out above (like so[^1]) and instruct people to install Python2 or port the Workflow to Python3 (or another language).
[^1]: Untested, but should work. It’s a temporary host because the Workflow is massive and GitHub complains about it.
Sorry guys -> I've been way behind working on other projects... :( And my version keeps working and working... (so its hard to debug this stuff) …
no worries man. if i get a bit better at Python i'll have a look. thanks again for the tacos!
I just ordered a new Mac today (6-8 weeks) -> so I'll likely have to fix this automation when it arrives...
So at least thats on the horizon. So I promise it will eventually get done as soon as it stops working for me
I lied ... i'm working on the code a bit today - but no promises
Probably wont be done today but i've got a py3 branch that i'm working on locally (outside of alfred) with only python3
so I've been porting thigs over. Decided to do a big code cleanup while I'm at it (well medium)...
And running into a few python 2-3 issues :)
So I have the code now running with python3 BUT python3 handles unicode / emojis differently so I need to dig through that. Also making a ton of improvements that probably none of you guys care about like adding more comments and return types (totally for readability not for usefulness)
https://github.com/jeeftor/EmojiTaco/releases/tag/py3
I haven't really had time to test this so its a crapshoot - but in theory it might kinda work
Also making a ton of improvements that probably none of you guys care about like adding more comments and return types (totally for readability not for usefulness)
are you kidding. clean and tight code is sexy af. 😍
I realized I forgot to update the script commands Alfred actually calls ... oops
Need to set pythonpath I think and python3 in the scripts if you are so motivated. I'll try tomorrow
So if somebody feels like testing stuff - I think your script commands need to look something like this:
SEARCH TASK
PYTHONPATH=$(pwd)/src/libs python3 src/esearch.py taco
INIT TASK
# No longer needed probably
# find . -name '*.so' | xargs xattr -d -r com.apple.quarantine
PYTHONPATH=$(pwd)/src/libs python3 src/downloadDataFiles.py
for your execution script on the search call for example
One caveat which may / may not cause issues:
In the background downloading script I'm calling /usr/bin/python3
so I'll need some folks to verify thats legit as well.
In the background downloading script I'm calling
/usr/bin/python3
so I'll need some folks to verify thats legit as well.
If you’re using an unmodified alfred-workflow
Python library, it won’t work. That library only works with Python 2, not 3. See https://github.com/deanishe/alfred-workflow/issues/97 for more information, and some efforts towards porting it.
@jeeftor https://github.com/lukewaite/alfred-gitlab/issues/27 might help. I've also successfully used it to port another workflow of mine to alfred-workflow
using py3.
Can somebody try the version I pushed? I have a new system on order which will force the issue on my end :)
The scripts should by py3 compatible for the most part now I think
Can somebody try the version I pushed? I have a new system on order which will force the issue on my end :)
doesn't work in my case sorry. keep getting modules not found
(cPickle, reload etc.).
but maybe it's my setting. running Python 3.9.12. also my binary is python3
, not python
.
edit: just to precise. i've first tried by replacing python by python3 in the Alfred objects. it didn't work. then i've put back python and i've symlinked python to python3 just in case. but got the same results.
Ok good to know!
(I really wish I had my new mac so i could test this in a clean environment)
On Tue, Mar 29, 2022 at 8:13 AM G. @.***> wrote:
Can somebody try the version I pushed? I have a new system on order which will force the issue on my end :)
doesn't work in my case sorry. keep getting modules not found (cPickle, reload etc.). but maybe it's my setting. running Python 3.9.12. also my binary is python3, not python.
— Reply to this email directly, view it on GitHub https://github.com/jeeftor/EmojiTaco/issues/27#issuecomment-1081925187, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQ4X6VQCPJ3MIVKTAMI7LVCMFZ7ANCNFSM5NFYRRVQ . You are receiving this because you were mentioned.Message ID: @.***>
wish i could help more but really i'm a turd in python. i'll help testing though (although not sure you can totally trust my reports 😬).
As soon as my new computer arrives - i probably have this fixed within 2-3 days since it will impact me directly :)
On Tue, Mar 29, 2022 at 9:45 AM G. @.***> wrote:
wish i could help more but really i'm a turd in python. i'll help testing though (although not sure you can totally trust my reports 😬).
— Reply to this email directly, view it on GitHub https://github.com/jeeftor/EmojiTaco/issues/27#issuecomment-1082043976, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRQ4X66CUUQPX74FNNUTADVCMQSTANCNFSM5NFYRRVQ . You are receiving this because you were mentioned.Message ID: @.***>
any place we can send you some donation to sponsor some coffee or beer or coke (hehe see what i did with the last one?) for your awesome work?
You can hit me here:
done. but i've sent some coins rather than hitting. i don't like violence. (ba dum tss.)
I played around a bit and got basic search working.
However I only get the unicode ascii returned and not the emoji - and the img
s are not downloaded. Leavings this to you :)
But FWIW there is no python3 error anymore.
As you see I needed to copy and duplicate some files as the paths were not correct and the workflow module was not found. Just did it very dirty but you might want to clean up for prod :)
https://github.com/pat-s/EmojiTaco/tree/py3
To get it working, you can c/p the repo contents into your alfred workflow folder and it should behave as in the screenshot.
PS: I didn't understand why you would need a new mac for testing this. I think you only need to exchange python
by python3
in the alfred script blocks and by this you should be able to make use of py3.
Good point. Mostly I need the motivation of it doesn’t work to siphon off time.
Maybe I’ll give it a go later today
Sent from my iPhone
On Apr 4, 2022, at 11:28 AM, Patrick Schratz @.***> wrote:
I played around a bit and got basic search working. However I only get the unicode ascii returned and not the emoji - and the imgs are not downloaded. Leavings this to you :) But FWIW there is no python3 error anymore.
As you see I needed to copy and duplicate some files as the paths were not correct and the workflow module was not found. Just did it very dirty but you might want to clean up for prod :)
https://github.com/pat-s/EmojiTaco/tree/py3
To get it working, you can c/p the repo contents into your alfred workflow folder and it should behave as in the screenshot.
PS: I didn't understand why you would need a new mac for testing this. I think you only need to exchange python by python3 in the alfred script blocks and by this you should be able to make use of py3.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
PS: I didn't understand why you would need a new mac for testing this. I think you only need to exchange
python
bypython3
in the alfred script blocks and by this you should be able to make use of py3.
extra motivation for when the stuff breaks for yourself 😅
Ya'll called me out ... I'll try to run with python3 on my local version :)
Updates ... the init emoji
command seems messed up :(
It "appears" I'm running into some issues with the background runner -> so I may have to develop a new way in Python3 to download the data files...
Thanks! This seems to coincide with my findings as the img/
files were not downloaded. Not sure how complicated a fix would be but I guess you can do it! 🚀
I think I managed to get the BG script running - however - there is currently no GUI information on it which is pretty annoying
Perhaps related to the 1st update - but in Python3 JSON text is displayed differently
So although these scripts work they might be pissing alfred off
Looks like there were some bugs in the library update process so I'll probably pull that out for now which means ya'll have to manually update
I'll push out another test shortly ... its going to be a bit shall we say hacky - but it might work. The main issue is you will have to run init emoji
and then just wait for many minutes - or manually view some log files to see when it completes...
I dont like that but its potentially where things are at right now 😠
ugh... looks like my release script also needs updates :(
Emoji Taco v1.2.3 — macOS 12.3 beta.
I've just updated to the macOS 12.3 beta that dropped a couple of days ago (I live dangerously) and Emoji Taco no longer works. No errors or glitches, anything after the initial Alfred keywords (aka, involves running a python script) just doesn't work.
My assumption is that this is because macOS 12.3 removes the bundled version of Python 2 (something Apple apparently said they were going to do in 2019). Bit weird of them to do that in a minor release, but that's Apple for ya.
Just giving a head's up in case no one has pointed this out yet!