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

Wrong error message when connecting variable with different units #573

Open
rparello opened this issue Oct 25, 2024 · 1 comment
Open

Wrong error message when connecting variable with different units #573

rparello opened this issue Oct 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rparello
Copy link

Describe the bug
If a variable is defined with different incompatible units in different modules, this following error message comes up. The problem is that the error message says it's the 'val' metadata that differ when its in fact the units. Can also append if the units is defined only in one module (but not always for some unclear reason). Makes it complex to debug

Expected behavior
the error message should be : The following inputs, ['Geometry.Geometrie_discipline.nose_landing_gear_length', 'QDV.QDV_discipline.nose_landing_gear_length', 'Structure.Structure_discipline.nose_landing_gear_length'], promoted to 'data:geometry:nose_landing_gear:length', are connected but their metadata entries ['units'] differ

Error message
Collected errors for problem 'Analysis_test':
: The following inputs, ['Geometry.Geometrie_discipline.nose_landing_gear_length', 'QDV.QDV_discipline.nose_landing_gear_length', 'Structure.Structure_discipline.nose_landing_gear_length'], promoted to 'data:geometry:nose_landing_gear:length', are connected but their metadata entries ['val'] differ.
Call .set_input_defaults('data:geometry:nose_landing_gear:length', val=?), where is the model to remove the ambiguity.
: Output units of 'kg' for '_auto_ivc.v86' are incompatible with input units of 'm' for 'Geometry.Geometrie_discipline.nose_landing_gear_length'.
: Output units of 'kg' for '_auto_ivc.v86' are incompatible with input units of 'm' for 'Structure.Structure_discipline.nose_landing_gear_length'.

Environment

  • Operating System: Windows 10
  • Python environment: Python 3.10.11
  • Packages:
    aenum 3.1.15 Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants
    aiofiles 22.1.0 File support for asyncio.
    aiosqlite 0.20.0 asyncio bridge to the standard sqlite3 module
    anyio 4.6.0 High level compatibility layer for multiple asynchronous event loop implementations
    argon2-cffi 23.1.0 Argon2 for Python
    argon2-cffi-bindings 21.2.0 Low-level CFFI bindings for Argon2
    arrow 1.3.0 Better dates & times for Python
    asttokens 2.4.1 Annotate AST trees with source code positions
    attrs 24.2.0 Classes Without Boilerplate
    babel 2.16.0 Internationalization utilities
    beautifulsoup4 4.12.3 Screen-scraping library
    bleach 6.1.0 An easy safelist-based HTML-sanitizing tool.
    build 1.2.2 A simple, correct Python build frontend
    certifi 2024.8.30 Python package for providing Mozilla's CA Bundle.
    cffi 1.17.1 Foreign Function Interface for Python calling C code.
    cfgv 3.4.0 Validate configuration and produce human readable error messages.
    charset-normalizer 3.3.2 The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
    chart-studio 1.1.0 Utilities for interfacing with plotly's Chart Studio
    click 8.1.7 Composable command line interface toolkit
    cma 4.0.0 CMA-ES, Covariance Matrix Adaptation Evolution Strategy for non-linear numerical optimization in Python
    colorama 0.4.6 Cross-platform colored terminal text.
    comm 0.2.2 Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc.
    contourpy 1.3.0 Python library for calculating contours of 2D quadrilateral grids
    coolprop 6.6.0 Open-source thermodynamic and transport properties database
    coverage 7.6.1 Code coverage measurement for Python
    cycler 0.12.1 Composable style cycles
    debugpy 1.8.6 An implementation of the Debug Adapter Protocol for Python
    decorator 5.1.1 Decorators for Humans
    defusedxml 0.7.1 XML bomb protection for Python stdlib modules
    deprecated 1.2.14 Python @deprecated decorator to deprecate old python classes, functions or methods.
    dill 0.3.9 serialize all of Python
    distlib 0.3.8 Distribution utilities
    ensure 1.0.4 Literate BDD assertions in Python with no magic
    et-xmlfile 1.1.0 An implementation of lxml.xmlfile for the standard library
    exceptiongroup 1.2.2 Backport of PEP 654 (exception groups)
    executing 2.1.0 Get the currently executing AST node of a frame, and other information
    fast-oad 1.7.4 FAST-OAD is a framework for performing rapid Overall Aircraft Design
    fast-oad-core 1.7.4 FAST-OAD is a framework for performing rapid Overall Aircraft Design
    fast-oad-cs25 0.7.1 FAST-OAD_CS25 is a FAST-OAD plugin with CS25/FAR25-related models.
    fastjsonschema 2.20.0 Fastest Python implementation of JSON schema
    filelock 3.16.1 A platform independent file lock.
    fonttools 4.54.1 Tools to manipulate font files
    fqdn 1.5.1 Validates fully-qualified domain names against RFC 1123, so that they are acceptable to modern bowsers
    identify 2.6.1 File identification library for Python
    idna 3.10 Internationalized Domain Names in Applications (IDNA)
    iniconfig 2.0.0 brain-dead simple config-ini parsing
    ipopo 1.0.2 A service-oriented component model framework
    ipykernel 6.29.5 IPython Kernel for Jupyter
    ipysheet 0.7.0 Spreadsheet in the Jupyter notebook.
    ipython 8.18.1 IPython: Productive Interactive Computing
    ipython-genutils 0.2.0 Vestigial utilities from IPython
    ipywidgets 7.8.4 IPython HTML widgets for Jupyter
    isoduration 20.11.0 Operations with ISO 8601 durations
    jedi 0.19.1 An autocompletion tool for Python that can be used for text editors.
    jenn 1.0.8 Jacobian-Enhanced Neural Nets (JENN)
    jinja2 3.1.4 A very fast and expressive template engine.
    joblib 1.4.2 Lightweight pipelining with Python functions
    json5 0.9.25 A Python implementation of the JSON5 data format.
    jsonpointer 3.0.0 Identify specific nodes in a JSON document (RFC 6901)
    jsonrpclib-pelix 0.4.3.3 This project is an implementation of the JSON-RPC v2.0 specification (backwards-compatible) as a client library, for Python 2.7 and Python 3. This version is a fork of ...
    jsonschema 4.23.0 An implementation of JSON Schema validation for Python
    jsonschema-specifications 2023.12.1 The JSON Schema meta-schemas and vocabularies, exposed as a Registry
    jupyter-client 8.6.3 Jupyter protocol implementation and client libraries
    jupyter-core 5.7.2 Jupyter core package. A base package on which Jupyter projects rely.
    jupyter-events 0.10.0 Jupyter Event System library
    jupyter-server 2.14.2 The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications.
    jupyter-server-fileid 0.9.3 Jupyter Server extension providing an implementation of the File ID service.
    jupyter-server-terminals 0.5.3 A Jupyter Server Extension Providing Terminals.
    jupyter-server-ydoc 0.8.0 A Jupyter Server Extension Providing Y Documents.
    jupyter-ydoc 0.2.5 Document structures for collaborative editing using Ypy
    jupyterlab 3.6.8 JupyterLab computational environment
    jupyterlab-pygments 0.3.0 Pygments theme using JupyterLab CSS variables
    jupyterlab-server 2.27.3 A set of server components for JupyterLab and JupyterLab like applications.
    jupyterlab-widgets 1.1.10 A JupyterLab extension.
    kiwisolver 1.4.7 A fast implementation of the Cassowary constraint solver
    llvmlite 0.43.0 lightweight wrapper around basic LLVM functionality
    lxml 5.3.0 Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
    markupsafe 2.1.5 Safely add untrusted strings to HTML/XML markup.
    matplotlib 3.9.2 Python plotting package
    matplotlib-inline 0.1.7 Inline Matplotlib backend for Jupyter
    mistune 3.0.2 A sane and fast Markdown parser with useful plugins and renderers
    multiprocess 0.70.16 better multiprocessing and multithreading in Python
    nbclassic 1.1.0 Jupyter Notebook as a Jupyter Server extension.
    nbclient 0.10.0 A client library for executing notebooks. Formerly nbconvert's ExecutePreprocessor.
    nbconvert 7.16.4 Converting Jupyter Notebooks (.ipynb files) to other formats. Output formats include asciidoc, html, latex, markdown, pdf, py, rst, script. nbconvert can be used both...
    nbformat 5.10.4 The Jupyter Notebook format
    nbval 0.11.0 A py.test plugin to validate Jupyter notebooks
    nest-asyncio 1.6.0 Patch asyncio to allow nested event loops
    networkx 3.2.1 Python package for creating and manipulating graphs and networks
    nodeenv 1.9.1 Node.js virtual environment builder
    notebook 6.5.4 A web-based notebook environment for interactive computing
    notebook-shim 0.2.4 A shim layer for notebook traits and config
    numba 0.60.0 compiling Python code using LLVM
    numpy 1.26.4 Fundamental package for array computing in Python
    openmdao 3.31.1 OpenMDAO framework infrastructure
    openmdao-extensions 1.3.1 Additional solvers and drivers for OpenMDAO framework
    openpyxl 3.1.5 A Python library to read/write Excel 2010 xlsx/xlsm files
    orjson 3.10.7 Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
    overrides 7.7.0 A decorator to automatically detect mismatch when overriding a method.
    packaging 24.1 Core utilities for Python packages
    pandas 2.2.3 Powerful data structures for data analysis, time series, and statistics
    pandocfilters 1.5.1 Utilities for writing pandoc filters in python
    parso 0.8.4 A Python Parser
    pathos 0.3.2 parallel graph management and execution in heterogeneous computing
    pillow 10.4.0 Python Imaging Library (Fork)
    pkginfo 1.11.1 Query metadata from sdists / bdists / installed packages.
    platformdirs 4.3.6 A small Python package for determining appropriate platform-specific dirs, e.g. a user data dir.
    plotly 5.24.1 An open-source, interactive data visualization library for Python
    pluggy 1.5.0 plugin and hook calling mechanisms for python
    pox 0.3.5 utilities for filesystem exploration and automated builds
    ppft 1.7.6.9 distributed and parallel Python
    pre-commit 3.8.0 A framework for managing and maintaining multi-language pre-commit hooks.
    prometheus-client 0.21.0 Python client for the Prometheus monitoring system.
    prompt-toolkit 3.0.48 Library for building powerful interactive command lines in Python
    psutil 6.0.0 Cross-platform lib for process and system monitoring in Python.
    pure-eval 0.2.3 Safely evaluate AST nodes without side effects
    pycparser 2.22 C parser in Python
    pydoe 0.3.8 Design of experiments for Python
    pydoe2 1.3.0 Design of experiments for Python
    pydoe3 1.0.4 Design of experiments for Python
    pyfarfadet 0.1.0
    pygments 2.18.0 Pygments is a syntax highlighting package written in Python.
    pyparsing 3.1.4 pyparsing module - Classes and methods to define and execute parsing grammars
    pyproject-hooks 1.2.0 Wrappers to call pyproject.toml-based build backend hooks.
    pytest 8.3.3 pytest: simple powerful testing with Python
    pytest-cov 5.0.0 Pytest plugin for measuring coverage.
    python-dateutil 2.9.0.post0 Extensions to the standard Python datetime module
    python-json-logger 2.0.7 A python library adding a json log formatter
    pytz 2024.2 World timezone definitions, modern and historical
    pywin32 306 Python for Window Extensions
    pywinpty 2.0.13 Pseudo terminal support for Windows from Python.
    pyyaml 6.0.2 YAML parser and emitter for Python
    pyzmq 26.2.0 Python bindings for 0MQ
    referencing 0.35.1 JSON Referencing + Python
    requests 2.32.3 Python HTTP for Humans.
    retrying 1.3.4 Retrying
    rfc3339-validator 0.1.4 A pure python RFC3339 validator
    rfc3986-validator 0.1.1 Pure python rfc3986 validator
    rpds-py 0.20.0 Python bindings to Rust's persistent data structures (rpds)
    ruamel-yaml 0.17.40 ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order
    ruamel-yaml-clib 0.2.8 C version of reader, parser and emitter for ruamel.yaml derived from libyaml
    ruff 0.6.4 An extremely fast Python linter and code formatter, written in Rust.
    salib 1.5.1 Tools for global sensitivity analysis. Contains Sobol', Morris, FAST, DGSM, PAWN, HDMR, Moment Independent and fractional factorial methods
    scikit-learn 1.5.2 A set of python modules for machine learning and data mining
    scipy 1.13.1 Fundamental algorithms for scientific computing in Python
    send2trash 1.8.3 Send file to trash natively under Mac OS X, Windows and Linux
    six 1.16.0 Python 2 and 3 compatibility utilities
    smt 2.7.0 The Surrogate Modeling Toolbox (SMT)
    sniffio 1.3.1 Sniff out which async library your code is running under
    soupsieve 2.6 A modern CSS selector implementation for Beautiful Soup.
    stack-data 0.6.3 Extract data from python stack frames and tracebacks for informative displays
    stdatm 0.4.3 Numpy-oriented Standard Atmosphere model
    tabulate 0.9.0 Pretty-print tabular data
    tenacity 9.0.0 Retry code until it succeeds
    terminado 0.18.1 Tornado websocket backend for the Xterm.js Javascript terminal emulator library.
    threadpoolctl 3.5.0 threadpoolctl
    tinycss2 1.3.0 A tiny CSS parser
    tomli 2.0.1 A lil' TOML parser
    tomli-w 1.0.0 A lil' TOML writer
    tomlkit 0.13.2 Style preserving TOML library
    tornado 6.4.1 Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
    tqdm 4.66.5 Fast, Extensible Progress Meter
    traitlets 5.14.3 Traitlets Python configuration system
    types-python-dateutil 2.9.0.20240906 Typing stubs for python-dateutil
    typing-extensions 4.12.2 Backported and Experimental Type Hints for Python 3.8+
    tzdata 2024.2 Provider of IANA time zone data
    uri-template 1.3.0 RFC 6570 URI Template Processor
    urllib3 2.2.3 HTTP library with thread-safe connection pooling, file post, and more.
    virtualenv 20.26.6 Virtual Python Environment builder
    wcwidth 0.2.13 Measures the displayed width of unicode strings in a terminal
    webcolors 24.8.0 A library for working with the color formats defined by HTML and CSS.
    webencodings 0.5.1 Character encoding aliases for legacy web content
    websocket-client 1.8.0 WebSocket client for Python with low level API options
    widgetsnbextension 3.6.9 IPython HTML widgets for Jupyter
    wop 2.5.5 WhatsOpt Command Line Interface
    wrapt 1.16.0 Module for decorators, wrappers and monkey patching.
    xdsmjs 2.0.0 XDSMjs Python module
    y-py 0.6.2 Python bindings for the Y-CRDT built from yrs (Rust)
    yabox 1.1.0 Yet another black-box optimization library for Python
    ypy-websocket 0.8.4 WebSocket connector for Ypy
@rparello rparello added the bug Something isn't working label Oct 25, 2024
@christophe-david
Copy link
Contributor

Actually, this error message comes from OpenMDAO. And in the present case, the important part of the message is the last part, where the incompatibility of units is exposed.

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

No branches or pull requests

2 participants