GithubHelp home page GithubHelp logo

Comments (3)

bouweandela avatar bouweandela commented on July 24, 2024

Other error messages and checks should be also be improved, e.g. when you provide a caption that is a list instead of a string, you will get this rather cryptic error message:

"""
Traceback (most recent call last):
  File "/mnt/lustre01/pf/b/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_task.py", line 671, in _run_task
    output_files = task.run()
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_task.py", line 227, in run
    self.output_files = self._run(input_files)
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_task.py", line 496, in _run
    self._collect_provenance()
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_task.py", line 559, in _collect_provenance
    product.save_provenance()
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_provenance.py", line 252, in save_provenance
    self._include_provenance()
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_provenance.py", line 248, in _include_provenance
    write(filename, attributes)
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_provenance.py", line 219, in _include_provenance_nc
    setattr(dataset, key, value)
  File "netCDF4/_netCDF4.pyx", line 2882, in netCDF4._netCDF4.Dataset.__setattr__
  File "netCDF4/_netCDF4.pyx", line 2812, in netCDF4._netCDF4.Dataset.setncattr
  File "netCDF4/_netCDF4.pyx", line 1568, in netCDF4._netCDF4._set_att
OSError: array string attributes can only be written with NETCDF4
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_main.py", line 228, in run
    conf = main(args)
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_main.py", line 156, in main
    process_recipe(recipe_file=recipe, config_user=cfg)
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_main.py", line 206, in process_recipe
    recipe.run()
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_recipe.py", line 1190, in run
    self.tasks, max_parallel_tasks=self._cfg['max_parallel_tasks'])
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_task.py", line 596, in run_tasks
    _run_tasks_parallel(tasks, max_parallel_tasks)
  File "/mnt/lustre01/pf/b/b309057/ESMValTool/core/esmvalcore/_task.py", line 641, in _run_tasks_parallel
    task.output_files, updated_products = result.get()
  File "/mnt/lustre01/pf/b/b309057/SOFTWARE/miniconda3/envs/esmvaltool/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
OSError: array string attributes can only be written with NETCDF4
2019-09-05 14:34:23,779 UTC [23512] INFO    If you suspect this is a bug or need help, please open an issue on https://github.com/ESMValGroup/ESMValTool/issues and attach the run/recipe_*.yml and run/main_log_debug.txt files from the output directory.

from esmvalcore.

bouweandela avatar bouweandela commented on July 24, 2024

The plan for the next release will be to implement the schema and only allow a single correct type for each entry.

from esmvalcore.

bouweandela avatar bouweandela commented on July 24, 2024

Note that currently there is a warning if no ancestor files are provided, however, this is probably a valid use case if the file is generated from code alone: ESMValGroup/ESMValTool#1722 (comment), so this should be supported.

It would also be nice to add provenance for ancestor files from auxiliary_data_dir (and drop the warnings if these are used).

from esmvalcore.

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.