Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error converting currency with fixer API key #85

Closed
tomasaazevedo opened this issue Dec 27, 2022 · 1 comment
Closed

Error converting currency with fixer API key #85

tomasaazevedo opened this issue Dec 27, 2022 · 1 comment

Comments

@tomasaazevedo
Copy link

Hi,

I've just downloaded the latest version of Calculate Anything (v3.5.0) on Alfred 5 on my Macbook with M1 Pro and I'm having trouble converting currencies with the fixer API. The conversion works normally with the built in integration, but as soon as I input the fixer API key, it stops working.

To Reproduce
Steps to reproduce the behavior:

  1. Open Alfred '...'
  2. Type '1usd'
  3. Alfred shows 'Updating currency rates...', then it disappears after a couple of seconds and nothing happens.

Expected behavior
It should display the conversion amount like it does for the default integration.

Debug Output
`[17:38:19.191] Logging Started...
[17:38:24.646] Calculate Anything[Script Filter] Queuing argument ''
[17:38:24.817] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:38:24.822] Calculate Anything[Script Filter] {"items":[]}
[17:38:25.376] Calculate Anything[Script Filter] Queuing argument 'u'
[17:38:25.486] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:38:25.491] Calculate Anything[Script Filter] {"items":[]}
[17:38:25.564] Calculate Anything[Script Filter] Queuing argument 'us'
[17:38:25.611] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:38:25.615] Calculate Anything[Script Filter] {"items":[]}
[17:38:25.764] Calculate Anything[Script Filter] Queuing argument 'usd'
[17:38:25.813] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:38:25.818] Calculate Anything[Script Filter] {"items":[{"title":"Updating currency rates...","valid":false,"arg":""}],"rerun":0.2,"variables":{"rerun":true}}
[17:38:26.022] Calculate Anything[Script Filter] Queuing argument 'usd'
[17:38:34.529] Calculate Anything[Script Filter] Script with argv '(null)' finished
[17:38:34.537] ERROR: Calculate Anything[Script Filter] Code 255: PHP Warning: Undefined array key "base" in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 484
PHP Warning: Undefined array key "rates" in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 485
PHP Warning: Trying to access array offset on value of type null in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 486
PHP Warning: Trying to access array offset on value of type null in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 488
PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php:489
Stack trace:
#0 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php(387): Workflow\Tools\Currency->fixerConversion(1.0, 'USD', 'BRL')
#1 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php(277): Workflow\Tools\Currency->convert(Array)
#2 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/calculateanything.php(140): Workflow\Tools\Currency->processQuery()
#3 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/calculateanything.php(86): Workflow\CalculateAnything->processByType()
#4 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/process.php(46): Workflow\CalculateAnything->processQuery()
#5 Command line code(2): include_once('/Users/tomasaze...')
#6 {main}
thrown in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 489
[17:38:34.538] Calculate Anything[Script Filter] Warning: Undefined array key "base" in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 484

Warning: Undefined array key "rates" in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 485

Warning: Trying to access array offset on value of type null in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 486

Warning: Trying to access array offset on value of type null in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 488

Fatal error: Uncaught DivisionByZeroError: Division by zero in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php:489
Stack trace:
#0 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php(387): Workflow\Tools\Currency->fixerConversion(1.0, 'USD', 'BRL')
#1 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php(277): Workflow\Tools\Currency->convert(Array)
#2 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/calculateanything.php(140): Workflow\Tools\Currency->processQuery()
#3 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/calculateanything.php(86): Workflow\CalculateAnything->processByType()
#4 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/process.php(46): Workflow\CalculateAnything->processQuery()
#5 Command line code(2): include_once('/Users/tomasaze...')
#6 {main}
thrown in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 489
[17:38:34.539] 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: Undefined array key "base" in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 484

Warning: Undefined array key "rates" in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 485

Warning: Trying to access array offset on value of type null in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 486

Warning: Trying to access array offset on value of type null in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 488

Fatal error: Uncaught DivisionByZeroError: Division by zero in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php:489
Stack trace:
#0 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php(387): Workflow\Tools\Currency->fixerConversion(1.0, 'USD', 'BRL')
#1 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php(277): Workflow\Tools\Currency->convert(Array)
#2 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/calculateanything.php(140): Workflow\Tools\Currency->processQuery()
#3 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/calculateanything.php(86): Workflow\CalculateAnything->processByType()
#4 /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/process.php(46): Workflow\CalculateAnything->processQuery()
#5 Command line code(2): include_once('/Users/tomasaze...')
#6 {main}
thrown in /Users/tomasazevedo/Dropbox/Aplicativos/Alfred/Alfred.alfredpreferences/workflows/user.workflow.008B90AA-AA3B-479C-B8F4-2F6B53FB3EE7/workflow/tools/currency.php on line 489`

System information:

  • OS: MacOS 13.0.1 (22A400)
  • Alfred Version: 5.0.6 [2110]
  • PHP Version: 8.2.0
@biati-digital
Copy link
Owner

Sorry for the late reply, A new update has been released 4.0.1 and this should fix your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants