Code Monkey home page Code Monkey logo

alfred-calculate-anything's People

Contributors

augusl avatar biati-digital avatar chrismessina avatar emresaracoglu avatar flightmansam avatar jun6lee avatar matthewmcvickar avatar pyrmont avatar twang817 avatar wwkeyboard avatar yock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alfred-calculate-anything's Issues

Can not calc

If you have a problem with the workflow please answer the following questions.

Describe the bug
Basic math expression can not be calculated

like 10+12, 100 + 16%

no matter wheher the system calculater turn off or on

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type '12 + 12'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.
Just the seach engine list, not the result

Debug Output

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

[22:27:13.437] Calculate Anything[Script Filter] Queuing argument ''
[22:27:13.523] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:27:13.525] Calculate Anything[Script Filter] {"items":[]}
[22:27:13.660] Calculate Anything[Script Filter] Queuing argument '2'
[22:27:13.732] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:27:13.734] Calculate Anything[Script Filter] {"items":[]}
[22:27:14.212] Calculate Anything[Script Filter] Queuing argument '2+'
[22:27:14.302] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:27:14.304] Calculate Anything[Script Filter] {"items":[]}
[22:27:14.687] Calculate Anything[Script Filter] Queuing argument '2+1'
[22:27:14.769] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:27:14.773] Calculate Anything[Script Filter] {"items":[]}
[22:27:14.827] Calculate Anything[Script Filter] Queuing argument '2+12'
[22:27:14.904] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:27:14.909] Calculate Anything[Script Filter] {"items":[]}

System information:

  • OS: macOS 10.15.7 (19H1217)
  • Alfred Version: 4.4.3 [1229]
  • PHP Version - To find out the version open the Terminal.app and type: php -v
PHP 7.3.11 (cli) (built: Jun  5 2020 23:50:40) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies

Additional context
Add any other context about the problem here.
It seems that the Calculate Anything doesn't work at all, no matter whatever I input.

Display exchange rate conversions in multiple currencies at once

I would like to make the following suggestion for making currency conversions more useful.

Instead of showing only the base currency conversion when target currency is skipped, it would be very useful to be able to define a list of currencies to be displayed in the results apart of base currency. Of course, the base currency should be displayed first.

As an example:
typing
100 jpy

would produce the following results:

3.91 RON
1 JPY = 0.039 RON

0.82 EUR
0.92 USD
0.70 GBP
[etc]

Macports / PHP81 not working

Looks like PHP81 makes some problems. I am not sure if this is only CA related or if Alfred internals have some problems too.

[16:14:00.757] Logging Started...
[16:14:06.595] Calculate Anything[Script Filter] Queuing argument ''
[16:14:06.633] Calculate Anything[Script Filter] Script with argv '' finished
[16:14:06.636] ERROR: Calculate Anything[Script Filter] Code 255: Warning: preg_match_all(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php on line 388

Fatal error: Uncaught Error: Class "Alfred\Exception" not found in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php:391
Stack trace:
#0 /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/workflow/lib/config/configuration.php(38): Alfred\getThemeStyle()
#1 /Users/robby/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D6B13C41-660C-40D9-BD0F-0B65C735DBAD(3): require_once('/Users/robby/Dr...')
#2 {main}
  thrown in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php on line 391
[16:14:06.637] 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:
Warning: preg_match_all(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php on line 388

Fatal error: Uncaught Error: Class "Alfred\Exception" not found in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php:391
Stack trace:
#0 /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/workflow/lib/config/configuration.php(38): Alfred\getThemeStyle()
#1 /Users/robby/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D6B13C41-660C-40D9-BD0F-0B65C735DBAD(3): require_once('/Users/robby/Dr...')
#2 {main}
  thrown in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php on line 391
[16:14:14.605] Calculate Anything[Script Filter] Queuing argument ' '
[16:14:14.634] Calculate Anything[Script Filter] Script with argv ' ' finished
[16:14:14.638] ERROR: Calculate Anything[Script Filter] Code 255: Warning: preg_match_all(): Compilation failed: unrecognised compile-time option bit(s) at offset 0 in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php on line 388

Fatal error: Uncaught Error: Class "Alfred\Exception" not found in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php:391
Stack trace:
#0 /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/workflow/lib/config/configuration.php(38): Alfred\getThemeStyle()
#1 /Users/robby/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/D6B13C41-660C-40D9-BD0F-0B65C735DBAD(3): require_once('/Users/robby/Dr...')
#2 {main}
  thrown in /Users/robby/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.989E62B9-BBC3-4E35-B13C-7359602320C8/alfred/Alfred.php on line 391

Installing and selecting PHP74 makes everything work again:

  • sudo port install php74
  • sudo port select php php74
  • php --version

calculate configure ERROR

If you have a problem with the workflow please answer the following questions.

Describe the bug
A clear and concise description of what the bug is.

calculate configure ERROR

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type '...'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Debug Output
Debug

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

[17:59:11.238] Calculate Anything[Script Filter] Queuing argument '(null)'
[17:59:11.303] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:59:11.306] STDERR: Calculate Anything[Script Filter] PHP Notice: Undefined variable: curr_name in /Users/xxx/Public/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1571C986-A554-48AB-B7BE-801131ED96B9/configure.php on line 29
[17:59:11.307] Calculate Anything[Script Filter] Notice: Undefined variable: curr_name in /Users/xxx/Public/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1571C986-A554-48AB-B7BE-801131ED96B9/configure.php on line 29
{"items": [{"title":"Set base language","subtitle":"Configure the base language: en_EN","valid":true,"arg":"language","match":"Set base language","autocomplete":null},{"title":"Add base currency","subtitle":"Set a base currency: USD","match":"Add base currency","autocomplete":"Add base currency","valid":true,"arg":"add_base_currency"},{"title":"Delete base currency","subtitle":"Delete configured base currency","match":"Delete base currency","autocomplete":"Delete base currency","valid":true,"arg":"delete_base_currency"},{"title":"Set currency locale","subtitle":"Used to give format to the value using your country format: en_US","match":"Set currency locale","autocomplete":"Set currency locale","valid":true,"arg":"locale_currency"},{"title":"Set Coinmarketcap API","subtitle":"Configure your coinmarketcap API Key: ","match":"Set Coinmarketcap API","autocomplete":"Set Coinmarketcap API","valid":true,"arg":"coinmarket_apikey"},{"title":"Set Fixer API","subtitle":"Configure your fixer API Key: ","match":"Set Fixer API","autocomplete":"Set Fixer API","valid":true,"arg":"fixer_apikey"},{"title":"Set System of Measurement","subtitle":"Define your system of measurement default to metric system: metric","match":"Set System of Measurement","autocomplete":"Set System of Measurement","valid":true,"arg":"measurement_system"},{"title":"Set VAT percentage","subtitle":"Configure your default VAT percentage: 16%","match":"Set VAT percentage","autocomplete":"Set VAT percentage","valid":true,"arg":"vat_percentage"},{"title":"Set base timezone","subtitle":"Base time zone to calculate dates in your time: America/Los_Angeles","match":"Set base timezone","autocomplete":"Set base timezone","valid":true,"arg":"time_zone"},{"title":"Add date format","subtitle":"Add date format","match":"Add date format","autocomplete":"Add date format","valid":true,"arg":"add_time_zone"},{"title":"Delete date format","subtitle":"Delete configured date format","match":"Delete date format","autocomplete":"Delete date format","valid":true,"arg":"delete_time_zone"},{"title":"Set base pixels","subtitle":"Configure the base pixels for font calculations: 16px","match":"Set base pixels","autocomplete":"Set base pixels","valid":true,"arg":"base_pixels"}] }
[17:59:11.308] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Notice: Undefined variable: curr_name in /Users/xxx/Public/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1571C986-A554-48AB-B7BE-801131ED96B9/configure.php on line 29
{"items": [{"title":"Set base language","subtitle":"Configure the base language:

System information:

  • OS: [e.g. Mac OS 10.15.15]
  • Alfred Version [e.g. 4]
  • PHP Version - To find out the version open the Terminal.app and type: php -v
    OS:11.2.3 (20D91)
    Alfred:4.3.2
    PHP:7.4.16

Additional context
Add any other context about the problem here.

Unable to run task

Hi,

since I upgraded to macOS Monterey I can not run your workflow anymore.

Are you using the latest version of the workflow?
Currently, I am using v.3.0.2

Describe the bug
When I type "ca" I got the following error message "Unable to run task". (Screenshot attached)

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type 'ca'
  3. See error

Debug Output
See attachment
Screen Shot 2021-11-01 at 11 40 41
Screen Shot 2021-11-01 at 11 56 09

System information:

  • OS: macOS Monterey 12.0.1
  • Alfred Version 4.6

currency calculation bug

Describe the bug
It doesn't work when I wanted to do some calculations about currency.

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred
  2. Type '100 USD to eur'
    iShot2021-04-28 22 45 25
  3. See error

Expected behavior
I want to get correct answer.

Debug Output
This is Alfred workflow debug ERROR tracking:

[22:38:24.407] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Warning: mkdir(): No such file or directory in /Users/duke/Downloads/Alfred setting/Alfred.alfredpreferences/workflows/user.workflow.981CDA56-3355-4457-BC3C-D0E828B804A6/alfred/Alfred.php on line 358

Warning: file_put_contents(/Users/duke/Library/Application Support/Alfred/Workflow Data/com.alfred.calculateanything/cache/exchangeratehost/rates.json): failed to open stream: No such file or directory in /Users/duke/Downloads/Alfred setting/Alfred.alfredpreferences/workflows/user.workflow.981CDA56-3355-4457-BC3C-D0E828B804A6/workflow/tools/currency.php on line 606
{"items":[{"title":"82.83 EUR","subtitle":"1 USD = 0.83 EUR","arg":"82.83","icon":{"path":"assets\/flags\/EUR.png"},"mods":{"cmd":{"valid":true,"arg":82.83,"subtitle":"Action this item to copy the amount with no format"},"alt":{"valid":true,"arg":0.83,"subtitle":"Action this item to copy the value of 1 to the clipboard"}}}]}

System information:
macOS 11.3
Alfred 4.3.4
PHP 7.3.24

Besides, I try to delete formal ca-v3 and re-import newly downloaded ca-v3.alfredworkflow. It doesn't work.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes)

This is what I get when trying the CA keyword. I can't use another features as well because of the same error.

[11:16:24.431] Calculate Anything[Script Filter] Queuing argument ''
[11:16:24.646] Calculate Anything[Script Filter] Queuing argument ' '
[11:16:31.615] Calculate Anything[Script Filter] Script with argv ' ' finished
[11:16:31.618] ERROR: Calculate Anything[Script Filter] Code 255: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/xxxxLibrary/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.660242C5-680D-43B5-B45C-E6BAE6A2544F/alfred/Alfred.php on line 136
[11:16:31.619] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/xxxx/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.660242C5-680D-43B5-B45C-E6BAE6A2544F/alfred/Alfred.php on line 136

System information:

  • macOS 11.3
  • Alfred 4.3.4
  • PHP 7.3.24

Calculate configure function - pressing enter

If you have a problem with the workflow please answer the following questions.

Describe the bug
A clear and concise description of what the bug is.
I was trying to change the date format etc. and used the "calculate configure" function to do this. When the options come up and I want to configure something, I press enter and the search box dissapears - I'm unable to change it.

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred 'command + spacebar'
  2. Type 'calculate configure'
  3. See options for what options to configure (e.g. "set base language")
  4. Press enter or "cmd + 1" (for set base language)
  5. Search box dissapears - unable to change "set language" or any other option

Expected behavior
After pressing "ENTER" it should give you the option to configure whatever you've chosen...

Debug Output
[11:50:59.494] Logging Started...
[11:51:01.319] Calculate Anything[Script Filter] Queuing argument ''
[11:51:01.321] Calculate Anything[Script Filter] Queuing argument '(null)'
[11:51:01.390] Calculate Anything[Script Filter] Script with argv '(null)' finished
[11:51:01.391] Calculate Anything[Script Filter] {"items": [{"title":"Set base language","subtitle":"Configure the base language: en_EN","valid":true,"arg":"language","match":"Set base language","autocomplete":null},{"title":"Add base currency","subtitle":"Set a base currency: GBP","match":"Add base currency","autocomplete":"Add base currency","valid":true,"arg":"add_base_currency"},{"title":"Delete base currency","subtitle":"Delete configured base currency","match":"Delete base currency","autocomplete":"Delete base currency","valid":true,"arg":"delete_base_currency"},{"title":"Set currency locale","subtitle":"Used to give format to the value using your country format: en_US","match":"Set currency locale","autocomplete":"Set currency locale","valid":true,"arg":"locale_currency"},{"title":"Set Coinmarketcap API","subtitle":"Configure your coinmarketcap API Key: ","match":"Set Coinmarketcap API","autocomplete":"Set Coinmarketcap API","valid":true,"arg":"coinmarket_apikey"},{"title":"Set Fixer API","subtitle":"Configure your fixer API Key: ","match":"Set Fixer API","autocomplete":"Set Fixer API","valid":true,"arg":"fixer_apikey"},{"title":"Set System of Measurement","subtitle":"Define your system of measurement default to metric system: metric","match":"Set System of Measurement","autocomplete":"Set System of Measurement","valid":true,"arg":"measurement_system"},{"title":"Set VAT percentage","subtitle":"Configure your default VAT percentage: 16%","match":"Set VAT percentage","autocomplete":"Set VAT percentage","valid":true,"arg":"vat_percentage"},{"title":"Set base timezone","subtitle":"Base time zone to calculate dates in your time: London","match":"Set base timezone","autocomplete":"Set base timezone","valid":true,"arg":"time_zone"},{"title":"Add date format","subtitle":"Add date format","match":"Add date format","autocomplete":"Add date format","valid":true,"arg":"add_time_zone"},{"title":"Delete date format","subtitle":"Delete configured date format","match":"Delete date format","autocomplete":"Delete date format","valid":true,"arg":"delete_time_zone"},{"title":"Set base pixels","subtitle":"Configure the base pixels for font calculations: 16px","match":"Set base pixels","autocomplete":"Set base pixels","valid":true,"arg":"base_pixels"}] }
[11:51:01.393] Calculate Anything[Script Filter] Script with argv '(null)' finished
[11:51:01.393] Calculate Anything[Script Filter] {"items": [{"title":"Set base language","subtitle":"Configure the base language: en_EN","valid":true,"arg":"language","match":"Set base language","autocomplete":null},{"title":"Add base currency","subtitle":"Set a base currency: GBP","match":"Add base currency","autocomplete":"Add base currency","valid":true,"arg":"add_base_currency"},{"title":"Delete base currency","subtitle":"Delete configured base currency","match":"Delete base currency","autocomplete":"Delete base currency","valid":true,"arg":"delete_base_currency"},{"title":"Set currency locale","subtitle":"Used to give format to the value using your country format: en_US","match":"Set currency locale","autocomplete":"Set currency locale","valid":true,"arg":"locale_currency"},{"title":"Set Coinmarketcap API","subtitle":"Configure your coinmarketcap API Key: ","match":"Set Coinmarketcap API","autocomplete":"Set Coinmarketcap API","valid":true,"arg":"coinmarket_apikey"},{"title":"Set Fixer API","subtitle":"Configure your fixer API Key: ","match":"Set Fixer API","autocomplete":"Set Fixer API","valid":true,"arg":"fixer_apikey"},{"title":"Set System of Measurement","subtitle":"Define your system of measurement default to metric system: metric","match":"Set System of Measurement","autocomplete":"Set System of Measurement","valid":true,"arg":"measurement_system"},{"title":"Set VAT percentage","subtitle":"Configure your default VAT percentage: 16%","match":"Set VAT percentage","autocomplete":"Set VAT percentage","valid":true,"arg":"vat_percentage"},{"title":"Set base timezone","subtitle":"Base time zone to calculate dates in your time: London","match":"Set base timezone","autocomplete":"Set base timezone","valid":true,"arg":"time_zone"},{"title":"Add date format","subtitle":"Add date format","match":"Add date format","autocomplete":"Add date format","valid":true,"arg":"add_time_zone"},{"title":"Delete date format","subtitle":"Delete configured date format","match":"Delete date format","autocomplete":"Delete date format","valid":true,"arg":"delete_time_zone"},{"title":"Set base pixels","subtitle":"Configure the base pixels for font calculations: 16px","match":"Set base pixels","autocomplete":"Set base pixels","valid":true,"arg":"base_pixels"}] }
[11:51:12.954] Calculate Anything[Script Filter] Processing complete
[11:51:12.958] Calculate Anything[Script Filter] Passing output 'delete_time_zone' to Run Script
[11:51:13.018] Calculate Anything[Run Script] Processing complete
[11:51:13.019] Calculate Anything[Run Script] Passing output '' to Post Notification

System information:

  • OS: Mac OS 11.2 (Big Sur)
  • Alfred Version 4
  • PHP Version - Terminal gives this message after typing "php -v": PHP is included in macOS for compatibility with legacy software.
    Future versions of macOS will not include PHP.
    PHP 7.3.24-(to be removed in future macOS) (cli) (built: Dec 21 2020 21:33:25) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies

Additional context
Add any other context about the problem here.

Vat not accurate

If you have a problem with the workflow please answer the following questions.

Describe the bug
A clear and concise description of what the bug is.
Vat is not accurate

To Reproduce
Steps to reproduce the behavior:
ca Set Vat was set to 7.75
Vat 100 produce
VAT of 100 = 7 should be 7.75
100 plus VAT = 107, should be 107.75
100 minus VAT = 58.82 This doesn't make sense

Expected behavior
A clear and concise description of what you expected to happen.

Debug Output
Debug

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

System information:

  • OS: 10.15.7
  • Alfred Version 4.3.4
  • PHP Version 8.0.6

Additional context
Add any other context about the problem here.
image

image

Automatically show base currency results after number without typing the currency symbol

For the people who use more than one base currency, it's frequent for us to convert among them.

For instance, I personally use CNY and USD as my two base currencies. More than 99%, I convert from CNY to USD, or vice versa.

It's helpful if it can automatically show several base-to-base currency conversion results once I type in the number without declaring the currency symbol (or else leave this as an option for convenience).

An example from another currency workflow showed as below:

image

While in this workflow, it's not that smart:

image

image

I can't make some units work

I'm not sure if this is user error; at the very least is a confusing workflow. Since I'm usually having trouble with pounds, I added this to my en_EN-keys.php

'pound' => 'lb',
'pounds' => 'lb',

So, here are some inconsistencies IMO:

This works
image

But this doesn't
image

But it works this way after adding it to en_EN-keys.php
image

This one is about precision that anything else, but still.
image

Thanks for the effort

Subtitle not formatted according the currency locale in crypto conversions (title is good)

Describe the bug
Subtitle not formatted according the currency locale in crypto conversions (title is good).

To Reproduce
Screen Shot 2021-04-13 at 02 36 55

Expected behavior
Subtitle formatted according the currency locale.

Debug Output

[02:41:31.759] Calculate Anything[Script Filter] Queuing argument ' btc in ars'
[02:41:31.964] Calculate Anything[Script Filter] Script with argv '(null)' finished
[02:41:31.967] Calculate Anything[Script Filter] {"items": [{"title":"5.620.679,81ARS","subtitle":"1BTC = 5,620,679.80ARS","arg":"5.620.679,81","icon":{"path":"flags\/ARS.png"},"mods":{"cmd":{"valid":true,"arg":5.62,"subtitle":"Action this item to copy the amount with no format"},"alt":{"valid":true,"arg":5620679.8,"subtitle":"Action this item to copy the value of 1 to the clipboard"}}}] }

System information:

  • OS: macOS 11.2.3
  • Alfred Version: 4.3.2
  • PHP Version: 7.3.24

Alfred unable to run task after typing 'ca'

If you have a problem with the workflow please answer the following questions.

Describe the bug
I installed calculate anything to Alfred 4 on my M1 MacBook Pro. The

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred
  2. Type 'ca'
  3. See error window with
    Screenshot

Reason: launch path not accessible

It's likely that the folder required to run this task has somehow been deleted, perhaps syncing?

This error isn't that serious, just try again :)

Related Workflow Info...
Name: 'Calculate Anything'
Folder:/Users/frsr/.config/alfred/Alfred.alfredpreferences/workflows/user.workflow.5D2E604F-EBE9-4000-8297-5D37A49326F5

Expected behavior
Alfred not to freak out and to let me set language as described in README.

Debug Output
[10:01:54.290] Logging Started...
[10:01:56.882] Calculate Anything[Script Filter] Queuing argument ''

System information:

  • OS: macOS 12.0 b3
  • Alfred Version: 4
  • PHP Version: 8.0.8

Additional context
I didn't have php installed but I downloaded it with homebrew and tried again without any change.

Converting currencies does not work

Are you using the latest version of the workflow?
Yes

Describe the bug
When trying to convert currencies calculate anything does not work, all I am getting are default searches.

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type '600 usd to eur'
  3. See only the searches options

Expected behavior
Converted value is displayed

Debug Output
image

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: Function money_format() is deprecated in /Users/janko/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.D46C1DFA-AA24-4138-8DCA-E37022618D37/workflow/tools/currency.php on line 266

Deprecated: Function money_format() is deprecated in /Users/janko/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.D46C1DFA-AA24-4138-8DCA-E37022618D37/workflow/tools/currency.php on line 269
{"items":[{"title":"105,53 EUR","subtitle":"1 USD = 0,88 EUR","arg":"105,53","icon":{"path":"assets/flags/EUR.png"},"mods":{"cmd":{"valid":true,"arg":10553,"subtitle":"Action this item to copy the amount with no format"},"alt":{"valid":true,"arg":88,"subtitle":"Action this item to copy the value of 1 to the clipboard"}}}]}

System information:

  • OS: Mac OS 12.0.1
  • Alfred Version 4.6
  • PHP Version - 7.4.25

Additional context

Convertion to RSD not working

Hey there, nice plugin!

Wanted to report that conversion to RSD currency is not working for some reason.

1 USD EUR works fine, 1 USD RSD doesn't.

Fixer API Key breaking currency conversion

If you have a problem with the workflow please answer the following questions.

Are you using the latest version of the workflow?
Yes. Current version installed is 3.1.1 (lasted updated Nov 1)

Describe the bug
There seems to be an issue converting currency after I entered the Fixer.io API Key. The conversion seemed fine without it.

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred
  2. Type 'ca set' and select ["Set Fixer API"]
  3. Enter my Free Fixer API, and press enter to save
  4. Type '100 usd'
  5. See error

Expected behavior
I expected the currency conversion / calculation to occur.

Working with default setup:

image

Note: This is not an issue for default conversion mechanism.

*****This only occurs when I enter have a Fixer API Key.

Debug Output

Not working with API Key entered (with any currency)

image

image

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

System information:

  • OS: [Mac OS 12.1]
  • Alfred Version [Alfred 4.6.1]
  • PHP Version: PHP 8.1.1 (cli) (built: Dec 17 2021 22:21:23) (NTS)

Additional context
You've created quite an amazing work flow / app, so I felt compelled to let you know a bug when I see one.
It currently works for me with the default currencies. Congratulations and thank you!

Base currency not converting cryptocurrencies properly

If you have a problem with the workflow please answer the following questions.

Are you using the latest version of the workflow?
Yes. Current version installed is 3.1.1 (lasted updated Nov 1)

Describe the bug
When querying cryptocurrency, the conversion only occurs for USD. Other base currencies, in my case, all 1 BTC calculates to 0.00 in CNY, EUR, TWD.

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred
  2. Type 'ca add' and select ["Add base currency"]
  3. Add any countries/currencies as desired, and press enter to save
  4. Type '1btc'
  5. See error

Expected behavior
I expected the currency conversion / calculation to occur and show corresponding to the cryptocurrency entered (BTC, ETH, etc).

Debug Output
image

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

System information:

  • OS: [Mac OS 12.1]
  • Alfred Version [Alfred 4.6.1]
  • PHP Version: PHP 8.1.1 (cli) (built: Dec 17 2021 22:21:23) (NTS)

Additional context
A small oversight, but still a bug. However, you've created quite an amazing work flow / app! Congratulations and thank you!

Support basic scientific computation

Do something like sin, cos, tan, log, log2, In, exp, abs, sqrt, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, ceil, floor, round, trunc, rint, near, dtor, rtod. etc.

image

It should not be that hard because there're lots of scientific computation workflows on Github for reference.

But it depends on your time since we already have an advanced calculator trigger by "=" as a built-in function :)

Very very small issue with VAT

I'm setting up a new Macbook Pro M1Pro
after installing the workflow I was testing everything and VAT wasn't working.
Turns out that even that by default it's set to 16%, it didn't work, but after I hit ca and set vat it works as expected.
but if you have a fresh install the default 16% doesn't take effect

Feature Request: Modulo operation

% currently only calculates the percentage, but in programming it's common to use it to calculate the remainder of a division, for example 5 % 2 = 1.

I would like to see the workflow return both.

Nothing works

Describe the bug
Conversion is simply not working. Try to type 100$ or 1 hour to seconds and it only shows Search Google for...

To Reproduce
Steps to reproduce the behaviour:

  1. Trigger Alfred
  2. Type 100$
  3. See errors

Expected behaviour
It should convert 100$ to my base currency in the line below.

Debug Output
Debug

System information:

  • OS: macOS 11.2.1
  • Alfred Version: 4.3.4 [1229]
  • PHP Version - 7.3.24 Screen Shot 2021-05-30 at 23 23 12

Additional context
About 10 days ago when I installed this workflow, it worked well. Today I try to use it but it turns out to be broken somehow.
I already reinstalled this workflow by downloading the latest version from Release page but it didn't fix the issue.

Incorrect base value for several Volume Units

Describe the bug
Incorrect volume conversions. (I did not check all, just few I was interested in)

Current base values:
"pt" => array("base" => "l", "conversion" => 0.56826125), //pint
"gal" => array("base" => "l", "conversion" => 4.405), //gallon
"qt" => array("base" => "l", "conversion" => 1.1365225), //quart

I believe those should be used:
"pt" => array("base" => "l", "conversion" => 0.473176473), //pint
"gal" => array("base" => "l", "conversion" => 3.78541178), //gallon
"qt" => array("base" => "l", "conversion" => 0.946352946), //quart

Not respecting (,) and period (.)

When I enter say 23,51 CHF ist interpretes it as 2351 instead of 23.51. Here in Germany 23,51 CHF = 23.51. Is there any way to fix this?

I've installed the workflow version 2.04.
I've also set it to base language de_DE, still no success.

Cryptocurrency Support

Great workflow, one of the best I've seen so far - good job!

Was just wondering if there's a chance you could add support for cryptocurrencies too? Looks like Fixer.io only supports Bitcoin.

CoinMarketCap seems to have a free API where we could grab our own keys:
https://coinmarketcap.com/api/

Feature Request: Support for more cryptocurrencies

Please could we get support for more cryptocurrencies than the 100 hardcoded?

The API appears to allow up to 5000 to be requested in one request. Could it be set to dynamically support the top 1000 say? Or does Alfred require a hardcoded list to know to call this workflow?

If so, is it possible to maybe cache the top 1k daily for example and reference that list?

I'd be happy to sacrifice some ease of use and type something else to tell it I want to look for a non-hardcoded currency, if that would make it possible.

Feature Request: convert to ft and inches

The best example is wolfram alpha:
query: 50 inches to ft and inches
returns: 4' 2"

Is there a way to do this already that I'm missing? If not, it would be really nice to add this.

Currency is not working

Currency is not working

[22:19:48.560] Calculate Anything[Script Filter] Queuing argument ''
[22:19:48.834] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:19:48.851] Calculate Anything[Script Filter] {"items":[]}
[22:19:48.875] Calculate Anything[Script Filter] Queuing argument ' '
[22:19:49.043] Calculate Anything[Script Filter] Queuing argument ' e'
[22:19:49.093] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:19:49.106] Calculate Anything[Script Filter] {"items":[]}
[22:19:49.192] Calculate Anything[Script Filter] Queuing argument ' eu'
[22:19:49.295] Calculate Anything[Script Filter] Queuing argument ' eur'
[22:19:49.372] Calculate Anything[Script Filter] Queuing argument ' eur '
[22:19:49.583] Calculate Anything[Script Filter] Queuing argument ' eur t'
[22:19:49.731] Calculate Anything[Script Filter] Queuing argument ' eur to'
[22:19:49.841] Calculate Anything[Script Filter] Queuing argument ' eur to '
[22:19:49.958] Calculate Anything[Script Filter] Queuing argument ' eur to d'
[22:19:50.063] Calculate Anything[Script Filter] Queuing argument ' eur to do'
[22:19:50.212] Calculate Anything[Script Filter] Queuing argument ' eur to dol'
[22:19:50.349] Calculate Anything[Script Filter] Queuing argument ' eur to doll'
[22:19:50.405] Calculate Anything[Script Filter] Queuing argument ' eur to dolla'
[22:19:50.499] Calculate Anything[Script Filter] Queuing argument ' eur to dollar'
[22:19:50.572] Calculate Anything[Script Filter] Queuing argument ' eur to dollars'
[22:19:51.063] Calculate Anything[Script Filter] Script with argv '(null)' finished
[22:19:51.088] Calculate Anything[Script Filter] Warning: mkdir(): No such file or directory in /Users/Hidden/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF56BC08-4B98-4B34-854A-402F8AAB4333/alfred/Alfred.php on line 358

Warning: file_put_contents(/Users/Hidden/Library/Application Support/Alfred/Workflow Data/com.alfred.calculateanything/cache/fixer/rates.json): failed to open stream: No such file or directory in /Users/Hidden/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF56BC08-4B98-4B34-854A-402F8AAB4333/workflow/tools/currency.php on line 606
{"items":[{"title":{"code":101,"type":"invalid_access_key","info":"You have not supplied a valid API Access Key. [Technical Support: [email protected]]"},"valid":false,"arg":""}]}
[22:19:51.090] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Warning: mkdir(): No such file or directory in /Users/Hidden/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF56BC08-4B98-4B34-854A-402F8AAB4333/alfred/Alfred.php on line 358

Warning: file_put_contents(/Users/Hidden/Library/Application Support/Alfred/Workflow Data/com.alfred.calculateanything/cache/fixer/rates.json): failed to open stream: No such file or directory in /Users/Hidden/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.DF56BC08-4B98-4B34-854A-402F8AAB4333/workflow/tools/currency.php on line 606
{"items":[{"title":{"code":101,"type":"invalid_access_key","info":"You have not supplied a valid API Access Key. [Technical Support: [email protected]]"},"valid":false,"arg":""}]}

Expected behavior
Convert currency

System information:

  • OS: 10.14.6
  • Alfred Version 4.3.4 [1228]
  • PHP Version PHP 7.1.33

Additional context
Add any other context about the problem here.

Allowed memory size of 134217728 bytes exhausted

No matter what I try to calculate with CA, it will not work. According to the error long below.

[17:47:04.679] ERROR: Calculate Anything[Script Filter] Code 255: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/XXXXDropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.15EFA02D-86C3-474A-81FB-FF5986D872B7/alfred/Alfred.php on line 48
[17:47:04.679] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/XXXX/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.15EFA02D-86C3-474A-81FB-FF5986D872B7/alfred/Alfred.php on line 48

it has something to do with my Dropbox. Does anyone have an idea what it could be? I tried restarting Alred, reinstalling CA etc. same error.

System information:

  • OS: Mac OS 11.4
  • Alfred Version 4.3.4
  • PHP Version PHP 7.3.24

Changes Icon

Would you mind to change the icon (e.g. another calculator icon)?

Now it's the same as the Alfred official calculator icon and sometimes confuses me:

image

Time not converting

Latest version of the code.
I'm using the time format: j F Y g:i a and the timezone: Bucharest (3 hours difference from UTC).
"time 3pm" shows the date + "3:00 pm" ; under it there's another format showing that it's in 3 hours.
"time 3pm utc" shows the same date ("3:00 pm") yet under it it shows 6 hours.
"time utc" wrongly displays my current timezone's time (not the UTC time).

Any idea what is happening?

Unable to

Hello.
I don't understand this problem. Do you know something about it?

CleanShot 2021-08-18 at 19 07 51@2x

Time function is broken

Hi,

I'm not able to use "time" function. It does show up when I write "time" but quickly goes away when I add something else.

I have no other function linked to "time" keyword.

image

My Config if can help is Mac M1.

Time Function not working

Are you using the latest version of the workflow?
Yes. On MacOS Monterey. M1 MacBook.

Describe the bug
Typing any query like "time start of 2021" returns no results.

To Reproduce
Screenshot 2021-11-28 at 8 56 31 AM

Expected behavior

Debug Output
Screenshot 2021-11-28 at 8 57 46 AM Redacted

System information:

  • OS: Mac OS 12.0.1
  • Alfred Version: 4.6.1
  • PHP Version - 8.0.13

Support specifying location / TZ in time

This is a cool workflow; supersedes couple of workflows I use.

Could time also support showing time for a different location (city maybe) or Timezone (PST)? Support for natural language would be a plus, i.e time in Chicago after 1 hour

not able to convert anything

I am using the latest version of the workflow.

Describe the bug
The conversions don't work.

To Reproduce
Steps to reproduce the behavior:
In Alfred, type "100 usd in" and all the various examples mentioned in the description. None of them work (that is, I get no result or response, as if the workflow doesn't exist in Alfred)

When I type ca, I get this error below. All other workflows are working and I dont know how to fix this.

image

Debug Output
[10:04:35.729] Calculate Anything[Script Filter] Queuing argument ''
[10:04:35.762] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:35.765] ERROR: Calculate Anything[Script Filter] Code 127: Exited with error code but no message
[10:04:35.866] Calculate Anything[Script Filter] Queuing argument '0'
[10:04:35.933] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:35.937] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:36.100] Calculate Anything[Script Filter] Queuing argument '00'
[10:04:36.117] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:36.121] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:36.334] Calculate Anything[Script Filter] Queuing argument '00 '
[10:04:36.356] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:36.360] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:36.530] Calculate Anything[Script Filter] Queuing argument '00 u'
[10:04:36.602] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:36.609] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:36.662] Calculate Anything[Script Filter] Queuing argument '00 us'
[10:04:36.672] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:36.673] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:37.544] Calculate Anything[Script Filter] Queuing argument '00 usd'
[10:04:37.620] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:37.632] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:39.761] Calculate Anything[Script Filter] Queuing argument '00 usd '
[10:04:39.795] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:39.805] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:40.000] Calculate Anything[Script Filter] Queuing argument '00 usd i'
[10:04:40.036] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:40.048] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found
[10:04:40.106] Calculate Anything[Script Filter] Queuing argument '00 usd in'
[10:04:40.131] Calculate Anything[Script Filter] Script with argv '(null)' finished
[10:04:40.138] ERROR: Calculate Anything[Script Filter] Code 127: /bin/bash: php: command not found

System information:

  • OS: [12 monterey beta 6]
  • Alfred Version [4.5.1]

Time not converting

If you have a problem with the workflow please answer the following questions.

Are you using the latest version?
Yes (in the recording the version is 4.3.4 but I've also tried with 4.5.

Describe the bug
I'm using the time format: j F Y g:i a and the timezone: Bucharest (3 hours difference from UTC).
"time 3pm" shows the date + "3:00 pm" ; under it there's another format showing that it's in 3 hours.
"time 3pm utc" shows the same date ("3:00 pm") yet under it it shows 6 hours.
"time utc" wrongly displays my current timezone's time (not the UTC time).

To Reproduce

  1. Set your computer timezone to GMT+3
  2. Open Alfred
  3. Type 'time 3pm'
  4. It shows '7 August 2021 3:00 pm', under it shows '7 hours, 36 seconds' (if it's 8 am)
  5. Type 'time 3pm utc'
  6. It shows '7 August 2021 3:00 pm' (instead of '7 August 2021 6:00 pm'), under it shows '10 hours'

Here is a video of this happening: https://www.screencast.com/t/3H9M5xSPXEO4

Expected behavior
At 6. it should show '7 August 2021 6:00 pm'

Debug Output
Debug

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

System information:

  • OS: Mac OS 11.5
  • Alfred Version 4.5
  • PHP Version - To find out the version open the Terminal.app and type: php -v 7.3

Additional context
Add any other context about the problem here.
I was told here to submit using template.

Screenshot 2021-08-07 at 08 03 36

Screenshot 2021-08-07 at 08 04 00

Stopped working

AFAIK I didn't touch or change anything. No matters what do I write (even copying examples from the readme) it doesn't work:

image

In Alfred everything seems okay, the workflow is there, enabled and so on. In fact, this works:

image

I'm up to date. What can it be?

Feature Request: Config option to never output workflow result numbers with commas

Personally, use this workflow more often for creating numbers that I'm plugging into code. This means having to remove the commas often. Extremely minor inconvenience but nonetheless would be lovely to have a config option telling the workflow I explicitly never want commas.

A good example where the commas get in the way a bit is for grabbing seconds for length variables and configuration of systems: "1 hr in s", "2 hours in s", "1 day in s", "1 hr in ms"

[Bug] Any temperature conversion results in "Cannot convert between units of different types"

Describe the bug
Alfred fails any and all temperature conversion with CalcAnything version 3.0.0

To Reproduce

Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type '100c f'
  3. See error 'Cannot convert between units of different types'

Expected behavior
Successful temperature conversion.

Debug Output
Debug
[17:19:13.131] Calculate Anything[Script Filter] Queuing argument ''
[17:19:13.378] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:19:13.383] Calculate Anything[Script Filter] {"items":[]}
[17:19:13.946] Calculate Anything[Script Filter] Queuing argument '0'
[17:19:14.138] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:19:14.142] Calculate Anything[Script Filter] {"items":[]}
[17:19:14.527] Calculate Anything[Script Filter] Queuing argument '00'
[17:19:14.741] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:19:14.745] Calculate Anything[Script Filter] {"items":[]}
[17:19:15.425] Calculate Anything[Script Filter] Queuing argument '00c'
[17:19:15.618] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:19:15.625] Calculate Anything[Script Filter] {"items":[]}
[17:19:16.226] Calculate Anything[Script Filter] Queuing argument '00c '
[17:19:16.357] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:19:16.363] Calculate Anything[Script Filter] {"items":[]}
[17:19:17.247] Calculate Anything[Script Filter] Queuing argument '00c f'
[17:19:17.441] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:19:17.450] Calculate Anything[Script Filter] {"items":[{"title":"Cannot Convert Between Units of Different Types","arg":false,"subtitle":"Action this item to copy this number to the clipboard","valid":false}]}

System information:

  • OS: [ Mac OS 11.3]
  • Alfred Version [4.3.4]
  • PHP Version - PHP 7.3.24

Additional context
Add any other context about the problem here.

Any queries broken after update to 3.0.1 (from 2.x)

Describe the bug
Any requests to alfred-calculate-anything are broken

To Reproduce

  1. Open Alfred '...'
  2. Type any request (like 100 USD)
  3. See nothing
    image

Expected behavior
Expect working output as with past versions

Debug Output
[15:06:08.026] Calculate Anything[Script Filter] Queuing argument ''
[15:06:08.123] Calculate Anything[Script Filter] Queuing argument '0'
[15:06:08.294] Calculate Anything[Script Filter] Queuing argument '00'
[15:06:09.268] Calculate Anything[Script Filter] Script with argv '(null)' finished
[15:06:09.271] ERROR: Calculate Anything[Script Filter] Code 255: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/aa.golovin/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FB55A8E0-8557-40AA-972D-481DE638ABFA/alfred/Alfred.php on line 136
[15:06:09.272] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /Users/aa.golovin/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.FB55A8E0-8557-40AA-972D-481DE638ABFA/alfred/Alfred.php on line 136

System information:

  • OS: 10.15.7
  • Alfred Version: 4.3.4
  • PHP Version: 7.3.11 (cli) (built: Jun 5 2020 23:50:40) ( NTS )

Currency Conversion not working

If you have a problem with the workflow please answer the following questions.

Describe the bug
A clear and concise description of what the bug is.
I was getting a lot of errors and I mean a lot, After debugging on my own and comparing with my laptop on which the workflow works perfectly, I noticed that the workflow uses MacOS own PHP which is version 7.3.11 where I have brew PHP installed and currently have 7.4.14, anyway I noticed I had a php.ini file in /etc on my computer and not on my laptop, so I deleted it and it got rid of so many errors, but still currency conversion is throwing an error:

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type '100 euros to dollars'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.
shows the price in usd

Debug Output
Debug

[15:12:19.834] Logging Stopped.
[15:12:25.919] Logging Started...
[15:12:32.097] Calculate Anything[Script Filter] Queuing argument '00 euros to dollars'
[15:12:32.163] Calculate Anything[Script Filter] Script with argv '(null)' finished
[15:12:32.163] Calculate Anything[Script Filter] Warning: Division by zero in /Users/yamantarakji/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC90BED8-9A7B-4593-98BB-EE8B929141F6/workflow/tools/currency.php on line 387
{"items": [{"title":".USD","subtitle":"1EUR = 0.00USD","arg":".","icon":{"path":"flags\/USD.png"},"mods":{"cmd":{"valid":true,"arg":0,"subtitle":"Action this item to copy the amount with no format"},"alt":{"valid":true,"arg":0,"subtitle":"Action this item to copy the value of 1 to the clipboard"}}}] }
[15:12:32.164] ERROR: Calculate Anything[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
Warning: Division by zero in /Users/yamantarakji/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AC90BED8-9A7B-4593-98BB-EE8B929141F6/workflow/tools/currency.php on line 387
{"items": [{"title":".USD","subtitle":"1EUR = 0.00USD","arg":".","icon":{"path":"flags\/USD.png"},"mods":{"cmd":{"valid":true,"arg":0,"subtitle":"Action this item to copy the amount with no format"},"alt":{"valid":true,"arg":0,"subtitle":"Action this item to copy the value of 1 to the clipboard"}}}] }

Please enable debug (see image) open Alfred and type the conversion that it's not working, you will see that the debug window is populated with a lot of text, please paste that text in here.

System information:

  • OS: [e.g. Mac OS 10.15.15]
  • Alfred Version [e.g. 4]
  • PHP Version - To find out the version open the Terminal.app and type: php -v

MacOS: 10.15.7
Alfred: 4.3.2
PHP 7.4.14 (brew) and 7.3.11 (macos) (which is what the workflow is using)

Additional context
Add any other context about the problem here.

CA not triggered, but default searches...

After installing CA and configuring it, it doesn't work and only the default search actions show up. I can't find any Alfred configuration that's getting into CA's way, nor where the default/fallback searches are defined.

Any idea how to give CA priority?

C4C6009C-71FC-4BC3-BB1E-61344E197C01

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.