tchar / ulauncher-albert-calculate-anything

A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.
MIT License
103 stars 13 forks source link

Extension stopped converting: 'currency' is not defined in the unit registry #42

Closed krillin666 closed 5 months ago

krillin666 commented 1 year ago

Hey,

The extension stopped working a few days ago. I've tried multiple conversions but I get no result with any of them.

In the console I have this error: pint.errors.UndefinedUnitError: 'currency' is not defined in the unit registry

Thank you!

GEkuL commented 1 year ago

Hi there! Have the same issue appeared after I installed the extension few days ago. @krillin666 have you found any solution?

fabiompneves commented 1 year ago

Same problem here. Not only corrency but others units to. Like celsius to fahrenheit and others.

maxime-rey commented 1 year ago

Same here and it was working well before I tried today. I'm using "internal".

Here's the python traceback:

Traceback (most recent call last):
  File "/home/max/.local/share/albert/org.albert.extension.python/modules/calculate-anything/calculate_anything/query/handlers/multi_handler.py", line 55, in _handle
    result = handler.handle(query)
  File "/home/max/.local/share/albert/org.albert.extension.python/modules/calculate-anything/calculate_anything/query/handlers/base.py", line 23, in _wrapper
    return func(self, query, *args, **kwargs)
  File "/home/max/.local/share/albert/org.albert.extension.python/modules/calculate-anything/calculate_anything/query/handlers/base.py", line 57, in handle
    return self.handle_raw(query, *args, **kwargs)
  File "/home/max/.local/share/albert/org.albert.extension.python/modules/calculate-anything/calculate_anything/query/handlers/units.py", line 240, in handle_raw
    with ureg.context('currency'):
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/context/registry.py", line 301, in context
    self.enable_contexts(*names, **kwargs)
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/context/registry.py", line 242, in enable_contexts
    self._switch_context_cache_and_units()
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/context/registry.py", line 151, in _switch_context_cache_and_units
    self._redefine(definition)
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/context/registry.py", line 175, in _redefine
    dims_old = self._get_dimensionality(basedef.reference)
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/plain/registry.py", line 660, in _get_dimensionality
    self._get_dimensionality_recurse(input_units, 1, accumulator)
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/plain/registry.py", line 681, in _get_dimensionality_recurse
    reg = self._units[self.get_name(key)]
  File "/home/max/.local/lib/python3.10/site-packages/pint/facets/plain/registry.py", line 588, in get_name
    raise UndefinedUnitError(name_or_alias)
pint.errors.UndefinedUnitError: 'currency' is not defined in the unit registry
zorzysty commented 1 year ago

Same here 😢

didaktiik commented 1 year ago

I have got the same problem, unfortunately.

GEkuL commented 1 year ago

@maxime-rey so do you mean it works fine with the flex.io only?

zorzysty commented 1 year ago

It doesn't work with fixer.io for me either.

fabiompneves commented 1 year ago

It doesn't work with internal or fixer.io. But not only currency is buggy the measures and other conversions doesn't work to

7549brijesh commented 1 year ago

Did Anyone got the solution for this? I am also in same situation

  1. currency conversion not working (even setting to both internal as well as with internal+fixer.io)
  2. measurement conversion is also not working
GEkuL commented 1 year ago

@tchar , could you help us with the trouble?

github-actions[bot] commented 1 year ago

Issue has been marked as stale due to no activity

stingray21 commented 1 year ago

Is there any update on this? I really miss using this extension

Mobilpadde commented 1 year ago

I've grown annoyed with this issue, so for converting currencies I'm using currency :shrug: 🤫

github-actions[bot] commented 1 year ago

Issue has been marked as stale due to no activity

tchar commented 5 months ago

Can you let me know if #48 fixed this?

sebastian-65 commented 5 months ago

@tchar Conversion works now. Thank you so much for fixing this!