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 in workflow - missing unary operator #71

Closed
lfilho opened this issue Jul 3, 2020 · 5 comments
Closed

Error in workflow - missing unary operator #71

lfilho opened this issue Jul 3, 2020 · 5 comments

Comments

@lfilho
Copy link

lfilho commented Jul 3, 2020

Hey, thanks for the great workflow!

I've been getting this error recently. Didn't change anything on my end. Tried deleting and then adding the workflow again to no luck:

image

Using workflow 3.7.0, Alfred 4.0.9 [1144] and macos 10.14.6

Any clue what's going on? Thanks!

@deanishe
Copy link
Owner

deanishe commented Jul 3, 2020

The error message in Alfred's main window isn't very helpful, I'm afraid. Please post the full error and traceback from the log file or Alfred's debugger.

@lfilho
Copy link
Author

lfilho commented Jul 3, 2020

Thanks for the tip (never had debugged a workflow before). Here it is:

[12:09:48.263] Logging Started...
[12:09:55.979] Convert[Script Filter] Queuing argument '10kg '
[12:09:56.860] Convert[Script Filter] Queuing argument '10kg lb'
[12:09:57.509] Convert[Script Filter] Script with argv '10kg ' finished
[12:09:57.512] ERROR: Convert[Script Filter] Code 1: .
12:09:57 workflow.py:2061 DEBUG    ---------- Convert (3.7.0) ----------
12:09:57 workflow.py:1468 DEBUG    reading settings from /Users/user/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-convert/settings.json
12:09:57 workflow.py:2343 DEBUG    update check not due
12:09:57 convert.py:646 DEBUG    query : 10kg 
12:09:57 workflow.py:2225 DEBUG    last run version: 3.7.0
12:09:57 convert.py:103 DEBUG    version=3.7.0, last_version=3.7.0
12:09:57 workflow.py:1695 DEBUG    loading cached data: /Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-convert/__workflow_latest_version.cpickle
12:09:57 workflow.py:1695 DEBUG    loading cached data: /Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-convert/exchange_rates.cpickle
12:09:57 convert.py:547 DEBUG    registering currency : 'DZD = usd / 128.967415 = dzd'
12:09:57 convert.py:547 DEBUG    registering currency : 'NAD = usd / 17.25 = nad'
12:09:57 convert.py:547 DEBUG    registering currency : 'GHS = usd / 5.789749 = ghs'
12:09:57 convert.py:547 DEBUG    registering currency : 'EGP = usd / 16.1607 = egp'
12:09:57 convert.py:547 DEBUG    registering currency : 'BGN = usd / 1.739785 = bgn'
12:09:57 convert.py:547 DEBUG    registering currency : 'PAB = usd / 1 = pab'
12:09:57 convert.py:547 DEBUG    registering currency : 'BOB = usd / 6.920018 = bob'
12:09:57 convert.py:547 DEBUG    registering currency : 'DKK = usd / 6.629574 = dkk'
12:09:57 convert.py:547 DEBUG    registering currency : 'BWP = usd / 11.745721 = bwp'
12:09:57 convert.py:547 DEBUG    registering currency : 'LBP = usd / 1513.825274 = lbp'
12:09:57 convert.py:547 DEBUG    registering currency : 'TZS = usd / 2318 = tzs'
12:09:57 convert.py:547 DEBUG    registering currency : 'VND = usd / 23293.446489 = vnd'
12:09:57 convert.py:547 DEBUG    registering currency : 'AOA = usd / 578.975 = aoa'
12:09:57 convert.py:547 DEBUG    registering currency : 'KHR = usd / 4100.631074'
12:09:57 convert.py:547 DEBUG    registering currency : 'QAR = usd / 3.641 = qar'
12:09:57 convert.py:547 DEBUG    registering currency : 'KYD = usd / 0.834002'
12:09:57 convert.py:547 DEBUG    registering currency : 'LYD = usd / 1.402532 = lyd'
12:09:57 convert.py:547 DEBUG    registering currency : 'UAH = usd / 26.744724 = uah'
12:09:57 convert.py:547 DEBUG    registering currency : 'JOD = usd / 0.709 = jod'
12:09:57 convert.py:547 DEBUG    registering currency : 'AWG = usd / 1.8 = awg'
12:09:57 convert.py:547 DEBUG    registering currency : 'SAR = usd / 3.750564 = sar'
12:09:57 convert.py:547 DEBUG    registering currency : 'BND = usd / 1.393314 = bnd'
12:09:57 convert.py:547 DEBUG    registering currency : 'HKD = usd / 7.750413 = hkd'
12:09:57 convert.py:547 DEBUG    registering currency : 'CHF = usd / 0.951204 = chf'
12:09:57 convert.py:547 DEBUG    registering currency : 'GIP = usd / 0.813009 = gip'
12:09:57 convert.py:547 DEBUG    registering currency : 'XPF = usd / 106.158159 = xpf'
12:09:57 convert.py:547 DEBUG    registering currency : 'XPD = usd / 0.00052472 = xpd'
12:09:57 convert.py:547 DEBUG    registering currency : 'BYN = usd / 2.403763 = byn'
12:09:57 convert.py:547 DEBUG    registering currency : 'MRO = usd / 357 = mro'
12:09:57 convert.py:547 DEBUG    registering currency : 'HRK = usd / 6.737183 = hrk'
12:09:57 convert.py:547 DEBUG    registering currency : 'DJF = usd / 178 = djf'
12:09:57 convert.py:547 DEBUG    registering currency : 'THB = usd / 30.8925 = thb'
12:09:57 convert.py:547 DEBUG    registering currency : 'XAF = usd / 583.542874 = xaf'
12:09:57 convert.py:547 DEBUG    registering currency : 'XAG = usd / 0.05602257 = xag'
12:09:57 convert.py:547 DEBUG    registering currency : 'ETB = usd / 34.014002 = etb'
12:09:57 convert.py:547 DEBUG    registering currency : 'UYU = usd / 42.099839 = uyu'
12:09:57 convert.py:547 DEBUG    registering currency : 'NIO = usd / 34.046071 = nio'
12:09:57 convert.py:547 DEBUG    registering currency : 'LAK = usd / 9035 = lak'
12:09:57 convert.py:547 DEBUG    registering currency : 'SYP = usd / 513.044746 = syp'
12:09:57 convert.py:547 DEBUG    registering currency : 'MAD = usd / 9.709 = mad'
12:09:57 convert.py:547 DEBUG    registering currency : 'MZN = usd / 70.113994 = mzn'
12:09:57 convert.py:547 DEBUG    registering currency : 'YER = usd / 250.300053 = yer'
12:09:57 convert.py:547 DEBUG    registering currency : 'ZAR = usd / 17.274446 = zar'
12:09:57 convert.py:547 DEBUG    registering currency : 'NPR = usd / 120.832755 = npr'
12:09:57 convert.py:547 DEBUG    registering currency : 'NGN = usd / 387.5 = ngn'
12:09:57 convert.py:547 DEBUG    registering currency : 'CRC = usd / 580.201245 = crc'
12:09:57 convert.py:547 DEBUG    registering currency : 'AED = usd / 3.67305 = aed'
12:09:57 convert.py:547 DEBUG    registering currency : 'GBP = usd / 0.813009 = gbp'
12:09:57 convert.py:547 DEBUG    registering currency : 'MWK = usd / 738.123883 = mwk'
12:09:57 convert.py:547 DEBUG    registering currency : 'LKR = usd / 186.336178 = lkr'
12:09:57 convert.py:547 DEBUG    registering currency : 'PKR = usd / 168.15 = pkr'
12:09:57 convert.py:547 DEBUG    registering currency : 'HUF = usd / 317.113442 = huf'
12:09:57 convert.py:547 DEBUG    registering currency : 'BMD = usd / 1 = bmd'
12:09:57 convert.py:547 DEBUG    registering currency : 'LSL = usd / 17.228184 = lsl'
12:09:57 convert.py:547 DEBUG    registering currency : 'MNT = usd / 2821.862234 = mnt'
12:09:57 convert.py:547 DEBUG    registering currency : 'AMD = usd / 481.616228 = amd'
12:09:57 convert.py:547 DEBUG    registering currency : 'UGX = usd / 3730.739612 = ugx'
12:09:57 convert.py:547 DEBUG    registering currency : 'XDR = usd / 0.725426 = xdr'
12:09:57 convert.py:547 DEBUG    registering currency : 'JMD = usd / 139.81191 = jmd'
12:09:57 convert.py:547 DEBUG    registering currency : 'TTD = usd / 6.766624 = ttd'
12:09:57 convert.py:547 DEBUG    registering currency : 'SHP = usd / 0.813009 = shp'
12:09:57 convert.py:547 DEBUG    registering currency : 'AFN = usd / 77.195156 = afn'
12:09:57 convert.py:547 DEBUG    registering currency : 'MMK = usd / 1381.509894 = mmk'
12:09:57 convert.py:547 DEBUG    registering currency : 'HasWarning = usd / False = haswarning'
12:09:57 convert.py:547 DEBUG    registering currency : 'KPW = usd / 900 = kpw'
12:09:57 convert.py:547 DEBUG    registering currency : 'TRY = usd / 6.8539 = try'
12:09:57 convert.py:547 DEBUG    registering currency : 'BDT = usd / 84.907103 = bdt'
12:09:57 convert.py:547 DEBUG    registering currency : 'CNY = usd / 7.0811 = cny'
12:09:57 convert.py:547 DEBUG    registering currency : 'HTG = usd / 109.950661 = htg'
12:09:57 convert.py:547 DEBUG    registering currency : 'SLL = usd / 9725.001574 = sll'
12:09:57 convert.py:547 DEBUG    registering currency : 'MGA = usd / 3862.586252 = mga'
12:09:57 convert.py:547 DEBUG    registering currency : 'PHP = usd / 49.728013'
12:09:57 convert.py:547 DEBUG    registering currency : 'LRD = usd / 199.250033 = lrd'
12:09:57 convert.py:547 DEBUG    registering currency : 'XCD = usd / 2.70255 = xcd'
12:09:57 convert.py:547 DEBUG    registering currency : 'NOK = usd / 9.675868 = nok'
12:09:57 convert.py:547 DEBUG    registering currency : 'MOP = usd / 7.989076 = mop'
12:09:57 convert.py:547 DEBUG    registering currency : 'SSP = usd / 130.26 = ssp'
12:09:57 convert.py:547 DEBUG    registering currency : 'INR = usd / 75.4922 = inr'
12:09:57 convert.py:547 DEBUG    registering currency : 'MXN = usd / 23.05996 = mxn'
12:09:57 convert.py:547 DEBUG    registering currency : 'CZK = usd / 23.841275 = czk'
12:09:57 convert.py:547 DEBUG    registering currency : 'TJS = usd / 10.313101 = tjs'
12:09:57 convert.py:547 DEBUG    registering currency : 'BTC = usd / 0.000108571559 = btc'
12:09:57 convert.py:547 DEBUG    registering currency : 'Message = usd / You are over your rate limit please upgrade your account! = message'
12:09:57 convert.py:547 DEBUG    registering currency : 'BTN = usd / 75.520442 = btn'
12:09:57 convert.py:547 DEBUG    registering currency : 'COP = usd / 3765.939442 = cop'
12:09:57 convert.py:547 DEBUG    registering currency : 'MYR = usd / 4.285 = myr'
12:09:57 convert.py:547 DEBUG    registering currency : 'TMT = usd / 3.51 = tmt'
12:09:57 convert.py:547 DEBUG    registering currency : 'MUR = usd / 39.952317 = mur'
12:09:57 convert.py:547 DEBUG    registering currency : 'IDR = usd / 14184.059 = idr'
12:09:57 convert.py:547 DEBUG    registering currency : 'GEL = usd / 3.055 = gel'
12:09:57 convert.py:547 DEBUG    registering currency : 'FJD = usd / 2.1669 = fjd'
12:09:57 convert.py:547 DEBUG    registering currency : 'ISK = usd / 138.25 = isk'
12:09:57 convert.py:547 DEBUG    registering currency : 'PEN = usd / 3.529 = pen'
12:09:57 convert.py:547 DEBUG    registering currency : 'BZD = usd / 2.017175 = bzd'
12:09:57 convert.py:547 DEBUG    registering currency : 'ILS = usd / 3.44543 = ils'
12:09:57 convert.py:547 DEBUG    registering currency : 'DOP = usd / 58.37148 = dop'
12:09:57 convert.py:547 DEBUG    registering currency : 'GGP = usd / 0.813009 = ggp'
12:09:57 convert.py:547 DEBUG    registering currency : 'MDL = usd / 17.200437 = mdl'
12:09:57 convert.py:547 DEBUG    registering currency : 'XPT = usd / 0.00122538 = xpt'
12:09:57 convert.py:547 DEBUG    registering currency : 'BSD = usd / 1 = bsd'
12:09:57 convert.py:547 DEBUG    registering currency : 'SEK = usd / 9.325692 = sek'
12:09:57 convert.py:547 DEBUG    registering currency : 'Response = usd / Error = response'
12:09:57 convert.py:547 DEBUG    registering currency : 'JEP = usd / 0.813009 = jep'
12:09:57 convert.py:547 DEBUG    registering currency : 'AUD = usd / 1.456304 = aud'
12:09:57 convert.py:547 DEBUG    registering currency : 'SRD = usd / 7.458 = srd'
12:09:57 convert.py:547 DEBUG    registering currency : 'CUP = usd / 25.75'
12:09:57 convert.py:547 DEBUG    registering currency : 'CLF = usd / 0.02966 = clf'
12:09:57 convert.py:547 DEBUG    registering currency : 'BBD = usd / 2 = bbd'
12:09:57 convert.py:547 DEBUG    registering currency : 'KMF = usd / 436.69981 = kmf'
12:09:57 convert.py:547 DEBUG    registering currency : 'KRW = usd / 1199.49 = krw'
12:09:57 convert.py:547 DEBUG    registering currency : 'GMD = usd / 51.65 = gmd'
12:09:57 convert.py:547 DEBUG    registering currency : 'VEF = usd / 248487.642241 = vef'
12:09:57 convert.py:547 DEBUG    registering currency : 'IMP = usd / 0.813009 = imp'
12:09:57 convert.py:547 DEBUG    registering currency : 'ANG = usd / 1.796305 = ang'
12:09:57 convert.py:547 DEBUG    registering currency : 'CUC = usd / 1 = cuc'
12:09:57 convert.py:547 DEBUG    registering currency : 'CLP = usd / 821.500232 = clp'
12:09:57 convert.py:547 DEBUG    registering currency : 'ZMW = usd / 18.160251 = zmw'
12:09:57 convert.py:547 DEBUG    registering currency : 'EUR = usd / 0.889605 = eur'
12:09:57 convert.py:547 DEBUG    registering currency : 'ALL = usd / 110.461066 = all'
12:09:57 convert.py:547 DEBUG    registering currency : 'RWF = usd / 954.573596 = rwf'
12:09:57 convert.py:547 DEBUG    registering currency : 'KZT = usd / 404.974323 = kzt'
12:09:57 convert.py:547 DEBUG    registering currency : 'RUB = usd / 70.101656 = rub'
12:09:57 convert.py:547 DEBUG    registering currency : 'Data = usd / {} = data'
12:09:57 workflow.py:2080 ERROR    While opening None, in line None: missing unary operator "/"
Traceback (most recent call last):
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/workflow/workflow.py", line 2073, in run
    func(self)
  File "convert.py", line 666, in main
    register_exchange_rates(exchange_rates)
  File "convert.py", line 548, in register_exchange_rates
    ureg.define(definition)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/registry.py", line 233, in define
    self._define(Definition.from_string(line))
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/definitions.py", line 57, in from_string
    return UnitDefinition(name, symbol, aliases, value)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/definitions.py", line 117, in __init__
    converter = ParserHelper.from_string(converter)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/util.py", line 423, in from_string
    return cls._from_string(input_string)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/compat/lrucache.py", line 129, in wrapper
    result = user_function(*args, **kwds)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/util.py", line 458, in _from_string
    ret = build_eval_tree(gen).evaluate(cls.eval_token)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/pint_eval.py", line 90, in evaluate
    raise DefinitionSyntaxError('missing unary operator "%s"' % op_text)
DefinitionSyntaxError: While opening None, in line None: missing unary operator "/"
12:09:57 workflow.py:2082 INFO     for assistance, see: https://github.com/deanishe/alfred-convert/issues
12:09:57 workflow.py:2103 DEBUG    ---------- finished in 0.407s ----------
[12:09:57.522] Convert[Script Filter] {"items": [{"valid": false, "subtitle": "While opening None, in line None: missing unary operator \"/\"", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"}, "title": "Error in workflow 'Convert'"}]}
[12:09:58.202] Convert[Script Filter] Script with argv '10kg lb' finished
[12:09:58.207] ERROR: Convert[Script Filter] Code 1: .
12:09:57 workflow.py:2061 DEBUG    ---------- Convert (3.7.0) ----------
12:09:57 workflow.py:1468 DEBUG    reading settings from /Users/user/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred-convert/settings.json
12:09:57 workflow.py:2343 DEBUG    update check not due
12:09:58 convert.py:646 DEBUG    query : 10kg lb
12:09:58 workflow.py:2225 DEBUG    last run version: 3.7.0
12:09:58 convert.py:103 DEBUG    version=3.7.0, last_version=3.7.0
12:09:58 workflow.py:1695 DEBUG    loading cached data: /Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-convert/__workflow_latest_version.cpickle
12:09:58 workflow.py:1695 DEBUG    loading cached data: /Users/user/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred-convert/exchange_rates.cpickle
12:09:58 convert.py:547 DEBUG    registering currency : 'DZD = usd / 128.967415 = dzd'
12:09:58 convert.py:547 DEBUG    registering currency : 'NAD = usd / 17.25 = nad'
12:09:58 convert.py:547 DEBUG    registering currency : 'GHS = usd / 5.789749 = ghs'
12:09:58 convert.py:547 DEBUG    registering currency : 'EGP = usd / 16.1607 = egp'
12:09:58 convert.py:547 DEBUG    registering currency : 'BGN = usd / 1.739785 = bgn'
12:09:58 convert.py:547 DEBUG    registering currency : 'PAB = usd / 1 = pab'
12:09:58 convert.py:547 DEBUG    registering currency : 'BOB = usd / 6.920018 = bob'
12:09:58 convert.py:547 DEBUG    registering currency : 'DKK = usd / 6.629574 = dkk'
12:09:58 convert.py:547 DEBUG    registering currency : 'BWP = usd / 11.745721 = bwp'
12:09:58 convert.py:547 DEBUG    registering currency : 'LBP = usd / 1513.825274 = lbp'
12:09:58 convert.py:547 DEBUG    registering currency : 'TZS = usd / 2318 = tzs'
12:09:58 convert.py:547 DEBUG    registering currency : 'VND = usd / 23293.446489 = vnd'
12:09:58 convert.py:547 DEBUG    registering currency : 'AOA = usd / 578.975 = aoa'
12:09:58 convert.py:547 DEBUG    registering currency : 'KHR = usd / 4100.631074'
12:09:58 convert.py:547 DEBUG    registering currency : 'QAR = usd / 3.641 = qar'
12:09:58 convert.py:547 DEBUG    registering currency : 'KYD = usd / 0.834002'
12:09:58 convert.py:547 DEBUG    registering currency : 'LYD = usd / 1.402532 = lyd'
12:09:58 convert.py:547 DEBUG    registering currency : 'UAH = usd / 26.744724 = uah'
12:09:58 convert.py:547 DEBUG    registering currency : 'JOD = usd / 0.709 = jod'
12:09:58 convert.py:547 DEBUG    registering currency : 'AWG = usd / 1.8 = awg'
12:09:58 convert.py:547 DEBUG    registering currency : 'SAR = usd / 3.750564 = sar'
12:09:58 convert.py:547 DEBUG    registering currency : 'BND = usd / 1.393314 = bnd'
12:09:58 convert.py:547 DEBUG    registering currency : 'HKD = usd / 7.750413 = hkd'
12:09:58 convert.py:547 DEBUG    registering currency : 'CHF = usd / 0.951204 = chf'
12:09:58 convert.py:547 DEBUG    registering currency : 'GIP = usd / 0.813009 = gip'
12:09:58 convert.py:547 DEBUG    registering currency : 'XPF = usd / 106.158159 = xpf'
12:09:58 convert.py:547 DEBUG    registering currency : 'XPD = usd / 0.00052472 = xpd'
12:09:58 convert.py:547 DEBUG    registering currency : 'BYN = usd / 2.403763 = byn'
12:09:58 convert.py:547 DEBUG    registering currency : 'MRO = usd / 357 = mro'
12:09:58 convert.py:547 DEBUG    registering currency : 'HRK = usd / 6.737183 = hrk'
12:09:58 convert.py:547 DEBUG    registering currency : 'DJF = usd / 178 = djf'
12:09:58 convert.py:547 DEBUG    registering currency : 'THB = usd / 30.8925 = thb'
12:09:58 convert.py:547 DEBUG    registering currency : 'XAF = usd / 583.542874 = xaf'
12:09:58 convert.py:547 DEBUG    registering currency : 'XAG = usd / 0.05602257 = xag'
12:09:58 convert.py:547 DEBUG    registering currency : 'ETB = usd / 34.014002 = etb'
12:09:58 convert.py:547 DEBUG    registering currency : 'UYU = usd / 42.099839 = uyu'
12:09:58 convert.py:547 DEBUG    registering currency : 'NIO = usd / 34.046071 = nio'
12:09:58 convert.py:547 DEBUG    registering currency : 'LAK = usd / 9035 = lak'
12:09:58 convert.py:547 DEBUG    registering currency : 'SYP = usd / 513.044746 = syp'
12:09:58 convert.py:547 DEBUG    registering currency : 'MAD = usd / 9.709 = mad'
12:09:58 convert.py:547 DEBUG    registering currency : 'MZN = usd / 70.113994 = mzn'
12:09:58 convert.py:547 DEBUG    registering currency : 'YER = usd / 250.300053 = yer'
12:09:58 convert.py:547 DEBUG    registering currency : 'ZAR = usd / 17.274446 = zar'
12:09:58 convert.py:547 DEBUG    registering currency : 'NPR = usd / 120.832755 = npr'
12:09:58 convert.py:547 DEBUG    registering currency : 'NGN = usd / 387.5 = ngn'
12:09:58 convert.py:547 DEBUG    registering currency : 'CRC = usd / 580.201245 = crc'
12:09:58 convert.py:547 DEBUG    registering currency : 'AED = usd / 3.67305 = aed'
12:09:58 convert.py:547 DEBUG    registering currency : 'GBP = usd / 0.813009 = gbp'
12:09:58 convert.py:547 DEBUG    registering currency : 'MWK = usd / 738.123883 = mwk'
12:09:58 convert.py:547 DEBUG    registering currency : 'LKR = usd / 186.336178 = lkr'
12:09:58 convert.py:547 DEBUG    registering currency : 'PKR = usd / 168.15 = pkr'
12:09:58 convert.py:547 DEBUG    registering currency : 'HUF = usd / 317.113442 = huf'
12:09:58 convert.py:547 DEBUG    registering currency : 'BMD = usd / 1 = bmd'
12:09:58 convert.py:547 DEBUG    registering currency : 'LSL = usd / 17.228184 = lsl'
12:09:58 convert.py:547 DEBUG    registering currency : 'MNT = usd / 2821.862234 = mnt'
12:09:58 convert.py:547 DEBUG    registering currency : 'AMD = usd / 481.616228 = amd'
12:09:58 convert.py:547 DEBUG    registering currency : 'UGX = usd / 3730.739612 = ugx'
12:09:58 convert.py:547 DEBUG    registering currency : 'XDR = usd / 0.725426 = xdr'
12:09:58 convert.py:547 DEBUG    registering currency : 'JMD = usd / 139.81191 = jmd'
12:09:58 convert.py:547 DEBUG    registering currency : 'TTD = usd / 6.766624 = ttd'
12:09:58 convert.py:547 DEBUG    registering currency : 'SHP = usd / 0.813009 = shp'
12:09:58 convert.py:547 DEBUG    registering currency : 'AFN = usd / 77.195156 = afn'
12:09:58 convert.py:547 DEBUG    registering currency : 'MMK = usd / 1381.509894 = mmk'
12:09:58 convert.py:547 DEBUG    registering currency : 'HasWarning = usd / False = haswarning'
12:09:58 convert.py:547 DEBUG    registering currency : 'KPW = usd / 900 = kpw'
12:09:58 convert.py:547 DEBUG    registering currency : 'TRY = usd / 6.8539 = try'
12:09:58 convert.py:547 DEBUG    registering currency : 'BDT = usd / 84.907103 = bdt'
12:09:58 convert.py:547 DEBUG    registering currency : 'CNY = usd / 7.0811 = cny'
12:09:58 convert.py:547 DEBUG    registering currency : 'HTG = usd / 109.950661 = htg'
12:09:58 convert.py:547 DEBUG    registering currency : 'SLL = usd / 9725.001574 = sll'
12:09:58 convert.py:547 DEBUG    registering currency : 'MGA = usd / 3862.586252 = mga'
12:09:58 convert.py:547 DEBUG    registering currency : 'PHP = usd / 49.728013'
12:09:58 convert.py:547 DEBUG    registering currency : 'LRD = usd / 199.250033 = lrd'
12:09:58 convert.py:547 DEBUG    registering currency : 'XCD = usd / 2.70255 = xcd'
12:09:58 convert.py:547 DEBUG    registering currency : 'NOK = usd / 9.675868 = nok'
12:09:58 convert.py:547 DEBUG    registering currency : 'MOP = usd / 7.989076 = mop'
12:09:58 convert.py:547 DEBUG    registering currency : 'SSP = usd / 130.26 = ssp'
12:09:58 convert.py:547 DEBUG    registering currency : 'INR = usd / 75.4922 = inr'
12:09:58 convert.py:547 DEBUG    registering currency : 'MXN = usd / 23.05996 = mxn'
12:09:58 convert.py:547 DEBUG    registering currency : 'CZK = usd / 23.841275 = czk'
12:09:58 convert.py:547 DEBUG    registering currency : 'TJS = usd / 10.313101 = tjs'
12:09:58 convert.py:547 DEBUG    registering currency : 'BTC = usd / 0.000108571559 = btc'
12:09:58 convert.py:547 DEBUG    registering currency : 'Message = usd / You are over your rate limit please upgrade your account! = message'
12:09:58 convert.py:547 DEBUG    registering currency : 'BTN = usd / 75.520442 = btn'
12:09:58 convert.py:547 DEBUG    registering currency : 'COP = usd / 3765.939442 = cop'
12:09:58 convert.py:547 DEBUG    registering currency : 'MYR = usd / 4.285 = myr'
12:09:58 convert.py:547 DEBUG    registering currency : 'TMT = usd / 3.51 = tmt'
12:09:58 convert.py:547 DEBUG    registering currency : 'MUR = usd / 39.952317 = mur'
12:09:58 convert.py:547 DEBUG    registering currency : 'IDR = usd / 14184.059 = idr'
12:09:58 convert.py:547 DEBUG    registering currency : 'GEL = usd / 3.055 = gel'
12:09:58 convert.py:547 DEBUG    registering currency : 'FJD = usd / 2.1669 = fjd'
12:09:58 convert.py:547 DEBUG    registering currency : 'ISK = usd / 138.25 = isk'
12:09:58 convert.py:547 DEBUG    registering currency : 'PEN = usd / 3.529 = pen'
12:09:58 convert.py:547 DEBUG    registering currency : 'BZD = usd / 2.017175 = bzd'
12:09:58 convert.py:547 DEBUG    registering currency : 'ILS = usd / 3.44543 = ils'
12:09:58 convert.py:547 DEBUG    registering currency : 'DOP = usd / 58.37148 = dop'
12:09:58 convert.py:547 DEBUG    registering currency : 'GGP = usd / 0.813009 = ggp'
12:09:58 convert.py:547 DEBUG    registering currency : 'MDL = usd / 17.200437 = mdl'
12:09:58 convert.py:547 DEBUG    registering currency : 'XPT = usd / 0.00122538 = xpt'
12:09:58 convert.py:547 DEBUG    registering currency : 'BSD = usd / 1 = bsd'
12:09:58 convert.py:547 DEBUG    registering currency : 'SEK = usd / 9.325692 = sek'
12:09:58 convert.py:547 DEBUG    registering currency : 'Response = usd / Error = response'
12:09:58 convert.py:547 DEBUG    registering currency : 'JEP = usd / 0.813009 = jep'
12:09:58 convert.py:547 DEBUG    registering currency : 'AUD = usd / 1.456304 = aud'
12:09:58 convert.py:547 DEBUG    registering currency : 'SRD = usd / 7.458 = srd'
12:09:58 convert.py:547 DEBUG    registering currency : 'CUP = usd / 25.75'
12:09:58 convert.py:547 DEBUG    registering currency : 'CLF = usd / 0.02966 = clf'
12:09:58 convert.py:547 DEBUG    registering currency : 'BBD = usd / 2 = bbd'
12:09:58 convert.py:547 DEBUG    registering currency : 'KMF = usd / 436.69981 = kmf'
12:09:58 convert.py:547 DEBUG    registering currency : 'KRW = usd / 1199.49 = krw'
12:09:58 convert.py:547 DEBUG    registering currency : 'GMD = usd / 51.65 = gmd'
12:09:58 convert.py:547 DEBUG    registering currency : 'VEF = usd / 248487.642241 = vef'
12:09:58 convert.py:547 DEBUG    registering currency : 'IMP = usd / 0.813009 = imp'
12:09:58 convert.py:547 DEBUG    registering currency : 'ANG = usd / 1.796305 = ang'
12:09:58 convert.py:547 DEBUG    registering currency : 'CUC = usd / 1 = cuc'
12:09:58 convert.py:547 DEBUG    registering currency : 'CLP = usd / 821.500232 = clp'
12:09:58 convert.py:547 DEBUG    registering currency : 'ZMW = usd / 18.160251 = zmw'
12:09:58 convert.py:547 DEBUG    registering currency : 'EUR = usd / 0.889605 = eur'
12:09:58 convert.py:547 DEBUG    registering currency : 'ALL = usd / 110.461066 = all'
12:09:58 convert.py:547 DEBUG    registering currency : 'RWF = usd / 954.573596 = rwf'
12:09:58 convert.py:547 DEBUG    registering currency : 'KZT = usd / 404.974323 = kzt'
12:09:58 convert.py:547 DEBUG    registering currency : 'RUB = usd / 70.101656 = rub'
12:09:58 convert.py:547 DEBUG    registering currency : 'Data = usd / {} = data'
12:09:58 workflow.py:2080 ERROR    While opening None, in line None: missing unary operator "/"
Traceback (most recent call last):
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/workflow/workflow.py", line 2073, in run
    func(self)
  File "convert.py", line 666, in main
    register_exchange_rates(exchange_rates)
  File "convert.py", line 548, in register_exchange_rates
    ureg.define(definition)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/registry.py", line 233, in define
    self._define(Definition.from_string(line))
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/definitions.py", line 57, in from_string
    return UnitDefinition(name, symbol, aliases, value)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/definitions.py", line 117, in __init__
    converter = ParserHelper.from_string(converter)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/util.py", line 423, in from_string
    return cls._from_string(input_string)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/compat/lrucache.py", line 129, in wrapper
    result = user_function(*args, **kwds)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/util.py", line 458, in _from_string
    ret = build_eval_tree(gen).evaluate(cls.eval_token)
  File "/Users/user/Documents/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6F7CF481-97E1-4239-9EDF-F5D016606732/pint/pint_eval.py", line 90, in evaluate
    raise DefinitionSyntaxError('missing unary operator "%s"' % op_text)
DefinitionSyntaxError: While opening None, in line None: missing unary operator "/"
12:09:58 workflow.py:2082 INFO     for assistance, see: https://github.com/deanishe/alfred-convert/issues
12:09:58 workflow.py:2103 DEBUG    ---------- finished in 0.209s ----------
[12:09:58.213] Convert[Script Filter] {"items": [{"valid": false, "subtitle": "While opening None, in line None: missing unary operator \"/\"", "icon": {"path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"}, "title": "Error in workflow 'Convert'"}]}

@deanishe
Copy link
Owner

deanishe commented Jul 4, 2020

This looks to be your problem:

12:09:58 convert.py:547 DEBUG registering currency : 'Message = usd / You are over your rate limit please upgrade your account! = message'

Try clearing the cache by entering `conv workflow:delcache‘ into Alfred and increase the exchange rate update interval in that workflow’s settings.

@lfilho
Copy link
Author

lfilho commented Jul 4, 2020

Huh. That did the trick, thanks. But I never changed the exchange rate update interval before, neither had an API key configured. Also, for non-currency related conversions, shouldn't the code bypass the exchange rate stuff? I.e.: i was converting kilograms, why prevent that conversion when there's something wrong with the currency conversion part..?

Thanks again. I'll close this issue, but if you agree with my thinking above feel free to reopen it :)

@lfilho lfilho closed this as completed Jul 4, 2020
@deanishe
Copy link
Owner

deanishe commented Jul 4, 2020

Also, for non-currency related conversions, shouldn't the code bypass the exchange rate stuff?

If you can think of a decent way of doing that, I'll happily accept a PR.

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