Giter Club home page Giter Club logo

Comments (2)

mdpiper avatar mdpiper commented on August 17, 2024

@Volk3rJ We haven't built a conda package for Python 3.12 yet. What you're getting is likely an old (v1.0.0) pure Python version of pymt. We've been working through our maintenance backlog recently and pymt is on our list of things to triage and update.

Python 3.11 will work (we have a conda package for it); also, building pymt from source will work.

from pymt.

aufdenkampe avatar aufdenkampe commented on August 17, 2024

@mdpiper, thanks for these suggestions, and also for your work on:

Here's a bit more info to help you/us collectively solve the challenge.

In your response to this issue:

You described that you need to update pymt because it's:

  1. not built for Python 3.12, and
  2. incompatible with recent changes to gimli.units.

I addressed both of those issues as I've been working through your new examples now (temporarily) at https://babelizer.readthedocs.io/en/mdpiper-add-cxx-example/.

Using this environment.yml file, I succeeded at building a conda environment for both Mac and Windows with:

- python=3.11
- pymt=1.3.1
- gimli.units=0.3.1 
    # Before reorg (https://github.com/mcflugen/gimli/pull/18) 
    # to prevent import error with pymt=1.3.1

That cleared the gimli.units import error, but then led to this error:

>>> from pymt.models import HeatC
Traceback (most recent call last):
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/model_metadata/modelmetadata.py", line 69, in __init__
    param = parameter_from_dict(params[name]).as_dict()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/model_metadata/model_parameter.py", line 160, in parameter_from_dict
    return IntParameter(value, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/model_metadata/model_parameter.py", line 386, in __init__
    raise ValueError(
ValueError: value must be either an int or a string that can be converted to an int (3650.0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/pymt/__init__.py", line 6, in <module>
    MODELS = ModelCollection()
             ^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/pymt/model_collection.py", line 22, in __new__
    models.append(ModelCollection.load_entry_point(entry_point))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/pymt/model_collection.py", line 69, in load_entry_point
    Model = bmi_factory(model)
            ^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/pymt/framework/bmi_bridge.py", line 778, in bmi_factory
    class BmiWrapper(BmiCap):
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/pymt/framework/bmi_bridge.py", line 780, in BmiWrapper
    __doc__ = bmi_docstring(cls)
              ^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/pymt/framework/bmi_docstring.py", line 103, in bmi_docstring
    meta = ModelMetadata.from_obj(plugin)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/model_metadata/modelmetadata.py", line 84, in from_obj
    return cls(ModelMetadata.find(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/aaufdenkampe/miniconda3/envs/wrap-all/lib/python3.11/site-packages/model_metadata/modelmetadata.py", line 71, in __init__
    raise ValueError(f"{name}: unable to load parameter")
ValueError: run_duration: unable to load parameter

from pymt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.