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

Adjust for pint 0.20 #40

Closed
khaeru opened this issue Oct 25, 2022 · 0 comments · Fixed by #41
Closed

Adjust for pint 0.20 #40

khaeru opened this issue Oct 25, 2022 · 0 comments · Fixed by #41

Comments

@khaeru
Copy link
Contributor

khaeru commented Oct 25, 2022

CI workflows for message_data (private) fail with messages like the following. Adjust.

Run pytest message_data \
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.8/x64/bin/pytest", line 8, in <module>
    sys.exit(console_main())
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 190, in console_main
    code = main()
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 148, in main
    config = _prepareconfig(args, plugins)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 329, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 55, in _multicall
    gen.send(outcome)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/helpconfig.py", line 103, in pytest_cmdline_parse
    config: Config = outcome.get_result()
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1058, in pytest_cmdline_parse
    self.parse(args)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1346, in parse
    self._preparse(args, addopts=addopts)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1248, in _preparse
    self.hook.pytest_load_initial_conftests(
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
    return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
    return outcome.get_result()
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
    res = hook_impl.function(*args)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1125, in pytest_load_initial_conftests
    self.pluginmanager._set_initial_conftests(
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 557, in _set_initial_conftests
    self._try_load_conftest(anchor, namespace.importmode, rootpath)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 574, in _try_load_conftest
    self._getconftestmodules(anchor, importmode, rootpath)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 603, in _getconftestmodules
    mod = self._importconftest(conftestpath, importmode, rootpath)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 651, in _importconftest
    self.consider_conftest(mod)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 732, in consider_conftest
    self.register(conftestmodule, name=conftestmodule.__file__)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 496, in register
    self.consider_module(plugin)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 740, in consider_module
    self._import_plugin_specs(getattr(mod, "pytest_plugins", []))
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 747, in _import_plugin_specs
    self.import_plugin(import_spec)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 774, in import_plugin
    __import__(importspec)
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/message_ix_models/__init__.py", line 4, in <module>
    from iam_units import registry
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/iam_units/__init__.py", line 18, in <module>
    registry.load_definitions(str(Path(__file__).parent / "data" / "definitions.txt"))
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pint/facets/plain/registry.py", line 521, in load_definitions
    for definition in self._def_parser.iter_parsed_project(parsed_project):
  File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pint/delegates/txt_defparser/defparser.py", line 84, in iter_parsed_project
    raise stmt
pint.delegates.txt_defparser.common.DefinitionSyntaxError: Cannot define 'vkm' (AliasDefinition): the alias v km is not a valid unit alias (must not contain spaces)
    73,0-73,23 @alias vkm = vkt = v km
    /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/iam_units/data/definitions.txt
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

Successfully merging a pull request may close this issue.

1 participant