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

Default unit is not saved #53

Closed
JasperGeh opened this issue May 30, 2019 · 3 comments
Closed

Default unit is not saved #53

JasperGeh opened this issue May 30, 2019 · 3 comments
Labels

Comments

@JasperGeh
Copy link

JasperGeh commented May 30, 2019

Pressing ⌘↵ on a conversion does not set the destination unit as the category default, even though the prompt is displayed.
Edit: I'm using the latest versions of both the workflow (3.6.0) and Alfred (4.0.1)

@deanishe
Copy link
Owner

It works for me.

Please post at least the output from Alfred's debugger.

@JasperGeh
Copy link
Author

JasperGeh commented May 30, 2019

Sure thing!
Here's the complete debugger output for entering "50 mph kph", setting the default and entering "50 mph" again. Anything more needed if the debugger output is the least? I already de- and reinstalled the workflow as well.

[22:26:35.739] Logging Started...
[22:26:45.536] Convert[Script Filter] Queuing argument '50mph '
[22:26:46.260] Convert[Script Filter] Script with argument '50mph ' finished
[22:26:46.264] STDERR: Convert[Script Filter] .
22:26:46 convert.py:570 CRITICAL No to_units (or defaults) for [length] / [time]
[22:26:46.265] Convert[Script Filter] {"items": [{"valid": false, "subtitle": "For example: 2.5cm in  |  178lb kg  |  200m/s mph", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"}, "title": "No destination units (or defaults) for [length] / [time]"}]}
[22:26:57.108] Convert[Script Filter] Queuing argument '50mph k'
[22:26:57.553] Convert[Script Filter] Script with argument '50mph k' finished
[22:26:57.558] STDERR: Convert[Script Filter] .
22:26:57 convert.py:575 CRITICAL invalid conversion (50mph k): Cannot convert from 'mph' ([length] / [time]) to 'boltzmann_constant' ([length] ** 2 * [mass] / [temperature] / [time] ** 2)
[22:26:57.559] Convert[Script Filter] {"items": [{"valid": false, "subtitle": "For example: 2.5cm in  |  178lb kg  |  200m/s mph", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"}, "title": "Can't convert from mph [length] / [time] to boltzmann_constant [length] ** 2 * [mass] / [temperature] / [time] ** 2"}]}
[22:26:58.334] Convert[Script Filter] Queuing argument '50mph kph'
[22:26:58.741] Convert[Script Filter] Script with argument '50mph kph' finished
[22:26:58.750] STDERR: Convert[Script Filter] .
[22:26:58.751] Convert[Script Filter] {"items": [{"mods": {"cmd": {"variables": {"action": "save", "query": "50mph kph", "dimensionality": "[length] / [time]", "unit": "kph"}, "subtitle": "Save kph as default unit for [length] / [time]"}}, "subtitle": "", "title": "80.47 kph", "text": {"copy": "80.47", "largetype": "80.47 kph"}, "variables": {"query": "50mph kph"}, "valid": true, "arg": "80.47", "icon": {"path": "icon.png"}}], "variables": {"query": "50mph kph"}}
[22:27:02.251] Convert[Script Filter] Processing complete
[22:27:02.264] Convert[Script Filter] Passing output '80.47' to Debug
[22:27:02.265] Convert[Debug] query=80.47,
variables={
  action = "save"
  APP_KEY = ""
  COPY_UNIT = ""
  CURRENCY_DECIMAL_PLACES = "2"
  DECIMAL_PLACES = "2"
  DECIMAL_SEPARATOR = "."
  dimensionality = "[length] / [time]"
  DYNAMIC_DECIMALS = "1"
  query = "50mph kph"
  THOUSANDS_SEPARATOR = ","
  unit = "kph"
  UPDATE_INTERVAL = "360"
}
[22:27:02.267] Convert[Debug] Processing complete
[22:27:02.267] Convert[Debug] Passing output '80.47' to Filter
[22:27:02.268] Convert[Debug] Passing output '80.47' to Filter
[22:27:02.269] Convert[Filter] Processing complete
[22:27:02.269] Convert[Filter] Passing output '80.47' to Run Script
[22:27:02.420] ERROR: Convert[Run Script] .
Usage:
    defaults.py save <dimensionality> <unit>
    defaults.py delete <dimensionality> <unit>
    defaults.py --help
[22:27:02.441] Convert[Run Script] Processing complete
[22:27:02.442] Convert[Run Script] Passing output '' to Post Notification
[22:27:02.443] Convert[Run Script] Passing output '' to Arg and Vars
[22:27:02.444] Convert[Arg and Vars] Processing complete
[22:27:02.444] Convert[Arg and Vars] Passing output '50mph kph' to Call External Trigger
[22:27:02.445] Convert[External] Processing complete
[22:27:02.446] Convert[External] Passing output '50mph kph' to Script Filter
[22:27:03.040] Convert[Script Filter] Queuing argument '50mph kph'
[22:27:03.461] Convert[Script Filter] Script with argument '50mph kph' finished
[22:27:03.483] STDERR: Convert[Script Filter] .
[22:27:03.485] Convert[Script Filter] {"items": [{"mods": {"cmd": {"variables": {"action": "save", "query": "50mph kph", "dimensionality": "[length] / [time]", "unit": "kph"}, "subtitle": "Save kph as default unit for [length] / [time]"}}, "subtitle": "", "title": "80.47 kph", "text": {"copy": "80.47", "largetype": "80.47 kph"}, "variables": {"query": "50mph kph"}, "valid": true, "arg": "80.47", "icon": {"path": "icon.png"}}], "variables": {"query": "50mph kph"}}
[22:27:07.203] Convert[Script Filter] Queuing argument '50mph '
[22:27:07.621] Convert[Script Filter] Script with argument '50mph ' finished
[22:27:07.648] STDERR: Convert[Script Filter] .
22:27:07 convert.py:570 CRITICAL No to_units (or defaults) for [length] / [time]
[22:27:07.649] Convert[Script Filter] {"items": [{"valid": false, "subtitle": "For example: 2.5cm in  |  178lb kg  |  200m/s mph", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns"}, "title": "No destination units (or defaults) for [length] / [time]"}]}

@deanishe
Copy link
Owner

Thanks. Fixed in v3.6.1. Or enter conv workflow:update in Alfred.

@deanishe deanishe added the bug label May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants