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

Update sdmx version dependency #129

Closed
macflo8 opened this issue Oct 11, 2023 · 3 comments · May be fixed by #135
Closed

Update sdmx version dependency #129

macflo8 opened this issue Oct 11, 2023 · 3 comments · May be fixed by #135
Assignees
Labels
bug Something isn't working

Comments

@macflo8
Copy link
Contributor

macflo8 commented Oct 11, 2023

When running mix-models --help, I got the following:

(base) C:\Users\maczek\PycharmProjects\message-ix-models>mix-models --help
Traceback (most recent call last):
  File "C:\Users\maczek\Anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\maczek\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\maczek\Anaconda3\Scripts\mix-models.exe\_main_.py", line 4, in <module>
  File "C:\Users\maczek\PycharmProjects\message-ix-models\message_ix_models\cli.py", line 138, in <module>
    _import_(name)
  File "C:\Users\maczek\PycharmProjects\message-ix-models\message_ix_models\project\ssp\_init_.py", line 9, in <module>
    from .structure import SSP, SSP_2017, SSP_2024, generate
  File "C:\Users\maczek\PycharmProjects\message-ix-models\message_ix_models\project\ssp\structure.py", line 203, in <module>
    SSP = SSP_2017 = make_enum("ICONICS:SSP(2017)")
  File "C:\Users\maczek\PycharmProjects\message-ix-models\message_ix_models\util\sdmx.py", line 115, in make_enum
    cl = read(urn)
  File "C:\Users\maczek\PycharmProjects\message-ix-models\message_ix_models\util\sdmx.py", line 146, in read
    for _, cls in msg.iter_collections():
AttributeError: 'StructureMessage' object has no attribute 'iter_collections'

sdmx was installed in version 2.10.0

It seems that sdmx.message.StructureMessage.iter_collections() has only been added in version 2.11.0. https://sdmx1.readthedocs.io/en/v2.11.0/api.html

So I guess pyproject.toml dependencies should be updated to "sdmx1" >= 2.11.0

@macflo8 macflo8 added the bug Something isn't working label Oct 11, 2023
@macflo8 macflo8 self-assigned this Oct 11, 2023
@khaeru
Copy link
Member

khaeru commented Oct 16, 2023

Thanks! Since this is a simple change, would you mind to open a PR to do it?

@glatterf42
Copy link
Member

See the linked PR, the first commit there introduces the desired change.

@glatterf42
Copy link
Member

Completed with af871f1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants