archelium Posted October 28, 2021 Share Posted October 28, 2021 (edited) 53 minutes ago, deanishe said: Read the thread. The solution is three posts above yours. Read it again. Not a fully working solution. EDIT: Also, I did try that. Not working for me still. EDIT2: When I said not working, I meant, the PHP error code doesn't pop up anymore, but nothing related to Calculate Anything comes up now when I type "CA". Edited October 28, 2021 by archelium added more details, again. Link to comment
archelium Posted October 28, 2021 Share Posted October 28, 2021 On 9/12/2021 at 3:26 PM, itsmevictor said: @biati @Pearcen@fddc I think that I have found a solution to have the workflow running on MacOS Monterey. As @Pearcensuggested, the problem seems to lie with MacOS Monterey not including PHP, thus preventing the workflow from running. I've downloaded PHP for MacOS Monterey using this Homebrew tap and the workflow is now running. EDIT: Actually, it seems to only be partially running. I'll look into it in greater depth later. I can confirm that it is partially working, but need to be running PHP 7.4 or below. PHP 8.0 does not seem to work for me. I am however getting a number of errors in the debug menu when typing anything on alfred. This is what it spits out when I type "123" on alfred: [16:05:24.842] Calculate Anything[Script Filter] Queuing argument '' [16:05:24.909] Calculate Anything[Script Filter] Script with argv '(null)' finished [16:05:24.909] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found [16:05:27.034] Calculate Anything[Script Filter] Queuing argument '2' [16:05:27.039] Calculate Anything[Script Filter] Script with argv '(null)' finished [16:05:27.042] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found [16:05:27.273] Calculate Anything[Script Filter] Queuing argument '23' [16:05:27.340] Calculate Anything[Script Filter] Script with argv '(null)' finished [16:05:27.340] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found Link to comment
Vero Posted October 28, 2021 Share Posted October 28, 2021 @archelium Could you please provide as much information as possible? E.g. workflow debugger logs, any console logs that might be relevant? Saying "It doesn't work" and providing shut-down answers make it difficult to help. Our community is here to help, but no one can see what's happening on your Mac specifically or know what you do/don't have installed, so please be as comprehensive as possible in providing this information. I have removed your most recent post, and would ask that all parties in this thread please take a moment to breathe before responding. This community is intended to be friendly and helpful, and posts that do not meet our Community Guidelines will be removed. Link to comment
deanishe Posted October 28, 2021 Share Posted October 28, 2021 Okay, the problem is that the workflow also calls php directly from bash scripts, which Alfred can’t fix so easily. Until we get an option to turn on Homebrew support, the only fix is to edit each of the Script Filters on the left-hand side from 0 down to time. In each of those Script Filters, at the top of each Script whose Language = /bin/bash, insert the line export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH That should fix the workflow. I can’t test the fix because the workflow isn’t broken on my machine. Link to comment
archelium Posted October 28, 2021 Share Posted October 28, 2021 1 hour ago, Vero said: @archelium Could you please provide as much information as possible? E.g. workflow debugger logs, any console logs that might be relevant? Saying "It doesn't work" and providing shut-down answers make it difficult to help. Our community is here to help, but no one can see what's happening on your Mac specifically or know what you do/don't have installed, so please be as comprehensive as possible in providing this information. I have removed your most recent post, and would ask that all parties in this thread please take a moment to breathe before responding. This community is intended to be friendly and helpful, and posts that do not meet our Community Guidelines will be removed. Yeah, got it, I apologize if I was out of line. Will try to provide as much detail as possible going forward. 1 hour ago, deanishe said: Okay, the problem is that the workflow also calls php directly from bash scripts, which Alfred can’t fix so easily. Until we get an option to turn on Homebrew support, the only fix is to edit each of the Script Filters on the left-hand side from 0 down to time. In each of those Script Filters, at the top of each Script whose Language = /bin/bash, insert the line export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH That should fix the workflow. I can’t test the fix because the workflow isn’t broken on my machine. Thank you, that did fix the errors in the debug, though I have yet to test out all the different features. Will update here once I go through them all. Link to comment
biati Posted October 28, 2021 Author Share Posted October 28, 2021 Hi @archelium i'm working with other user on Github to release an update, there's a pending issue related to cryptocurrencies saying that the API key is not provided when it's already set, i'm not able to replicate the issue because i'm still on Big Sur but we are investigating. Once the update is ready i'll let everyone know archelium 1 Link to comment
biati Posted October 28, 2021 Author Share Posted October 28, 2021 @kagi the workflow does temperature conversion, it has support for Kelvin, Celsius and Fahrenheit, do you need some other unit? In the Readme you can find all the available units it can handle. https://github.com/biati-digital/alfred-calculate-anything/blob/master/README.md Link to comment
itsmevictor Posted October 28, 2021 Share Posted October 28, 2021 @biati Many thanks for having created the workflow and for being working on its update to make it work on Monterey. Good luck ! Link to comment
alfredpanda Posted October 29, 2021 Share Posted October 29, 2021 I also really appreciate you working on a Monterey fix! Love this workflow. Thanks Link to comment
RIDA Posted October 30, 2021 Share Posted October 30, 2021 Thank you so much. With the amazing workflow you created, I can now do exchange currency, numerical calculations, and percentages at once. I just joined the forum to say thank you! I hope you work less and make a lot of money be a super super rich!!!!!! If you guys have a problem with setting the base currency, just search for ca on alfred and enter your exchange rate!! Link to comment
ProRock Posted November 1, 2021 Share Posted November 1, 2021 Still cannot make it work on Monterey Intel Mac. I brew installed php using. The workflow crashes the moment I type "ca". Please assist. I cannot make sense of the code, maybe you could. Here is the log: [16:48:39.960] Calculate Anything[Script Filter] Queuing argument '' [16:48:40.032] Calculate Anything[Script Filter] Script with argv '' finished [16:48:40.034] STDERR: Calculate Anything[Script Filter] PHP Deprecated: Required parameter $keywordsArray follows optional parameter $word in /Users/MYNAME/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.940D56D2-1406-4D8B-AC77-F3635740EF99/workflow/calculateanything.php on line 678 [16:48:40.035] Calculate Anything[Script Filter] Deprecated: Required parameter $keywordsArray follows optional parameter $word in /Users/MYNAME/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.940D56D2-1406-4D8B-AC77-F3635740EF99/workflow/calculateanything.php on line 678 {"items":[{"title":"Calculate Anything","subtitle":"Calculate Anything...","valid":true,"uid":"ca","arg":"ca ","variables":{"fromkeyword":true,"action":"menu"}}]} [16:48:40.036] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON: Deprecated: Required parameter $keywordsArray follows optional parameter $word in /Users/MYNAME/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.940D56D2-1406-4D8B-AC77-F3635740EF99/workflow/calculateanything.php on line 678 {"items":[{"title":"Calculate Anything","subtitle":"Calculate Anything...","valid":true,"uid":"ca","arg":"ca ","variables":{"fromkeyword":true,"action":"menu"}}]} Link to comment
itsmevictor Posted November 1, 2021 Share Posted November 1, 2021 @ProRockIt is usually useful to read the thread before commenting. @biaticommented a few days ago that they were working on an update to make the workflow work on Monterey. As of now, your best option is to wait. Link to comment
tyyyo Posted November 1, 2021 Share Posted November 1, 2021 managed to get it to work I basically removed all php and reinstalled homebrew php and added "export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH" on every script filter. there's still some issues that i am unable to get it to work such as currency converter, the results just doesnt show when i type "100 usd to sgd". Great workflow nevertheless Link to comment
tyyyo Posted November 1, 2021 Share Posted November 1, 2021 @prorock do check whether you are on the latest build of Alfred Link to comment
ProRock Posted November 1, 2021 Share Posted November 1, 2021 @itsmevictorI read through all the pages. Thought my log could be helpful as the other fixes didn't work. @biatisaid they havent yet upgraded to Monterey, so might not receive a same issue as I have. Link to comment
biati Posted November 1, 2021 Author Share Posted November 1, 2021 @itsmevictor @archelium @ProRock @alfredpanda the latest version has been released, you can download it here https://github.com/biati-digital/alfred-calculate-anything/releases The workflow now works correctly with Monterey. For users that might have not read the discussion in the forum or Github, to summarize: 1.- You need to install PHP with Homebrew (explained in the ReadMe) 2.- You need the latest version of Alfred 3.- You need the latest version of Calculate Anything. For users on Mac OS Big Sur or lower you do not need to do anything, Your OS already includes PHP, just install the workflow and it will work without problems. ProRock, alfredpanda and cands 2 1 Link to comment
alfredpanda Posted November 1, 2021 Share Posted November 1, 2021 Works perfectly - thank you so much! I really appreciate the work you've put into this - I rely on it every day 🙂 Link to comment
ProRock Posted November 4, 2021 Share Posted November 4, 2021 Thank you @biati. The workflow works perfectly now. Love it, can't recommend enough. Link to comment
dampearth Posted November 27, 2021 Share Posted November 27, 2021 People are saying it's working perfectly now. I just installed this, and perhaps I missed a step? I am on an M1 Mac, running Monterey. I ran the command to install Homebrew. I then installed php. I downloaded the most up to date version of CA and ran it. when I open Alfred and type ca, I was able to set a language and base currency. all those commands appear. but when I try to type something like "100 euros to usd" I get search google, search amazon and search wiki. what step did I miss? Link to comment
deanishe Posted November 27, 2021 Share Posted November 27, 2021 (edited) Hi @dampearth, welcome to the forum. 3 hours ago, dampearth said: I get search google, search amazon and search wiki. Those are Alfred's fallback searches. They're shown if a workflow returns no results. We can't possibly diagnose an issue without more information than that. If a workflow isn't working properly, check the debugger for error messages and always include them in your posts. Edited November 27, 2021 by deanishe dampearth 1 Link to comment
dampearth Posted November 28, 2021 Share Posted November 28, 2021 (edited) 14 hours ago, deanishe said: Hi @dampearth, welcome to the forum. Those are Alfred's fallback searches. They're shown if a workflow returns no results. We can't possibly diagnose an issue without more information than that. If a workflow isn't working properly, check the debugger for error messages and always include them in your posts. ok I'm having issues with the coinmarketcap api. I would type 1 bitcoin, and it told me I needed to get the api. I got the api and now it shows the fallback searches. here's debugger Quote [10:18:29.525] Calculate Anything[Script Filter] Queuing argument '' [10:18:29.598] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:29.600] Calculate Anything[Script Filter] {"items":[]} [10:18:29.785] Calculate Anything[Script Filter] Queuing argument ' ' [10:18:29.843] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:29.846] Calculate Anything[Script Filter] {"items":[]} [10:18:29.940] Calculate Anything[Script Filter] Queuing argument ' b' [10:18:29.992] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:29.995] Calculate Anything[Script Filter] {"items":[]} [10:18:30.052] Calculate Anything[Script Filter] Queuing argument ' bi' [10:18:30.091] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:30.095] Calculate Anything[Script Filter] {"items":[]} [10:18:30.145] Calculate Anything[Script Filter] Queuing argument ' bit' [10:18:30.178] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:30.185] Calculate Anything[Script Filter] {"items":[]} [10:18:30.316] Calculate Anything[Script Filter] Queuing argument ' bitc' [10:18:30.367] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:30.373] Calculate Anything[Script Filter] {"items":[]} [10:18:30.415] Calculate Anything[Script Filter] Queuing argument ' bitco' [10:18:30.451] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:30.460] Calculate Anything[Script Filter] {"items":[]} [10:18:30.498] Calculate Anything[Script Filter] Queuing argument ' bitcoi' [10:18:30.529] Calculate Anything[Script Filter] Script with argv '(null)' finished [10:18:30.535] Calculate Anything[Script Filter] {"items":[]} [10:18:30.559] Calculate Anything[Script Filter] Queuing argument ' bitcoin' Edited November 28, 2021 by dampearth Link to comment
RIDA Posted December 2, 2021 Share Posted December 2, 2021 (edited) Hi @biati, After my MacBook update, this workflow became unavailable. I get this warning when I type ca, can you tell me what to do? Edited December 2, 2021 by RIDA Link to comment
deanishe Posted December 2, 2021 Share Posted December 2, 2021 2 hours ago, RIDA said: can you tell me what to do? Read the thread. The answer is literally a few posts above yours: Link to comment
Guest Posted December 8, 2021 Share Posted December 8, 2021 Hi, can your give an option to set base unit? Link to comment
biati Posted December 8, 2021 Author Share Posted December 8, 2021 hi @Fanghao a base unit for what? please provide more info, examples, etc. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now