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

JSON error while convert currencies #76

Closed
difujia opened this issue Jul 21, 2022 · 5 comments
Closed

JSON error while convert currencies #76

difujia opened this issue Jul 21, 2022 · 5 comments

Comments

@difujia
Copy link

difujia commented Jul 21, 2022

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

Are you using the latest version of the workflow?
Yes, v3.5.0

Describe the bug

Cannot convert currencies

To Reproduce
Steps to reproduce the behavior:
Type any currency conversion syntax like: 100 jpy to usd
Observed: no result shown

Expected behavior
Conversion result should be shown

Debug Output
image

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:

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: macOS 12.4
  • Alfred Version 5
  • PHP Version 8.1.8

Additional context
Add any other context about the problem here.

@biati-digital
Copy link
Owner

Hi, did you configure your API Key?

@difujia
Copy link
Author

difujia commented Jul 22, 2022

Hi, did you configure your API Key?

No I don't

@nchieng
Copy link

nchieng commented Nov 15, 2022

I've obtained a Fixer API key from API Layer, and configured the workflow with it. (v 3.5.0)
The problem still persists.

[12:35:38.816] 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 "message" in /Users/<uname>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<>/workflow/tools/currency.php on line 467

Warning: Trying to access array offset on value of type float in /Users/<uname>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<>/workflow/tools/currency.php on line 287

Warning: Trying to access array offset on value of type float in /Users/<uname>/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.<>/workflow/tools/currency.php on line 289

@biati-digital
Copy link
Owner

There's a new version 4.0.0. Please read the release to see what's new.

Please note, the only way for currency to not work it's because it's not able to grab the rates from fixer or exchangeratehost, are you using a software to block outgoing connections?

If you are using Alfred 5 you can migrate you configuration to the new workflow configuration window. The workflow should still be able to read the old config but try it anyway.

@biati-digital
Copy link
Owner

A new update has been released 4.0.1 this one should solve this situation, seems to be the same as #103

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

3 participants