Closed Timothy-W-Hilton closed 10 months ago
👋 @Timothy-W-Hilton Arg! I'm so sorry! The whole reason for those changes in v0.8.0 was to fix your issue at gantian127/pymt_era5#1.
The reason pymt_era5 breaks with python 3.12 is because the latest versions of pymt are not available for Python 3.12, which was, in part, issues with model_metadata.
Anyway, thanks for reporting and I'll try to get to it asap.
👋 @Timothy-W-Hilton Arg! I'm so sorry! The whole reason for those changes in v0.8.0 was to fix your issue at gantian127/pymt_era5#1.
d'oh! No good deed goes unpunished, ha ha. Thanks for all your work on this :)
@Timothy-W-Hilton I hope that #30 will fix your issue.
@Timothy-W-Hilton I hope that #30 will fix your issue.
Thanks, @mcflugen! I'm not having much luck testing it; I think it could well be down to my inadequate conda/mamba/git chops and not to a problem with PR#30.
In a fresh Python 3.12.1 virtual environment I:
1) git cloned pymt main@head locally, cloned model_metadata locally, fetched PR#30 and checked out PR#30.
2) installed pymt using pip. I installed from source because it does not seem to have a pypi presence
3) installed model_metadata PR#30 using pip. The logs indicate it uninstalled the model_metadata pip installed in (2), and installed the local version. import model_metadata;model_metadata.__version__
returns 0.8.1.dev0, so I believe it.
4) installed pymt_era5 using pip.
After this process from pymt.models import Era5
gives me:
Python 3.12.1 | packaged by conda-forge | (main, Dec 23 2023, 08:03:24) [GCC 12.
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymt.models import Era5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/timh/Code/pymt/pymt/__init__.py", line 1, in <module>
from gimli import UnitSystem
ModuleNotFoundError: No module named 'gimli'
So I installed gimli using pip, and then got:
Python 3.12.1 | packaged by conda-forge | (main, Dec 23 2023, 08:03:24) [GCC 12.
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymt.models import Era5
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/timh/Code/pymt/pymt/__init__.py", line 1, in <module>
from gimli import UnitSystem
ImportError: cannot import name 'UnitSystem' from 'gimli' (/home/timh/mambaforge
It's possible that the way I smooshed this environment together caused this rather than any problem with PR#30.
Hello,
Seems that model_metadata 0.8.0 breaks pymt.models.Era5 imports. I'm posting this here (and not at pymt_era5) because I don't see any model_metadata documentation suggesting 0.8.0 should break back-compatibility, but please let me know if you think it belongs elsewhere.
Minimal working example below. Python is pegged to 3.11 because Python 3.12 seems to break pymt_era5 (see issue #1 there).
pymt_era5 imports as expected under model_metadata 0.7.0.
Importing pymt_era5 throws several exceptions under model_metadata 0.8.0: