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

CMOR.write fails on OSX in validation of attributes #354

Closed
tommibergman opened this issue May 25, 2018 · 11 comments
Closed

CMOR.write fails on OSX in validation of attributes #354

tommibergman opened this issue May 25, 2018 · 11 comments

Comments

@tommibergman
Copy link

I have a case where the CMOR is trying to validate the license information for our model during writing and complains about an error on OSX. I am using the python bindings for CMOR. The same case works fine on ECMWF supercomputer.

I attach here the error message:

C Traceback:
! In function: _CV_ValidateAttribute
! called from: _CV_checkGblAttributes
! called from: cmor_write
!

!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Error: The attribute "license" could not be validated.
! The current input value is "CMIP6 model data produced by EC-Earth-Consortium is licensed under a Creative Commons Attribution NonCommercial ShareAlike 4.0 International License (https://creativecommons.org/licenses). Consult https://pcmdi.llnl.gov/CMIP6/TermsOfUse for terms of use governing CMIP6 output, including citation requirements and proper acknowledgment. Further information about this data, including some limitations, can be found via the further_info_url (recorded as a global attribute in this file) http://furtherinfo.es-doc.org/CMIP6.KNMI.EC-Earth.historical. The data producers and data providers make no warranty, either express or implied, including, but not limited to, warranties of merchantability and fitness for a particular purpose. All liabilities arising from the supply of the information (including any liability arising in negligence) are excluded to the fullest extent permitted by law." which is not valid
! Valid values must matc
!
!!!!!!!!!!!!!!!!!!!!!!!!!

@doutriaux1
Copy link
Collaborator

@tommibergman I ran into something similar on a side test case this week. Thanks for reporting, do you mind attaching the file containing your license info on here. I'm worried copy/pasting might remove someinvisible characters.

@taylor13
Copy link
Collaborator

Why should this problem be occurring all of a sudden? It's been working for months.

@doutriaux1
Copy link
Collaborator

@taylor13 might be an invisible character, might be a change in Python regex, as I said once I get the file from @tommibergman I will investigate further.

@tommibergman
Copy link
Author

We use this file for the metadata. Had to zip it, JSON is not supported here.
metadata-template.json.zip

@doutriaux1
Copy link
Collaborator

doutriaux1 commented Jun 6, 2018

@tommibergman

I just used your file (in Test directory), and ran cmor off of master on it and it worked on both Linux and Mac OSX, does the attached script works for you?
license.zip

@doutriaux1
Copy link
Collaborator

@tommibergman notice that your metadata-template.json file needs to have the calendar attribute added.

@tommibergman
Copy link
Author

The attached scripts fails also on the validation of license. It seems this is related to my setup. Do you have any idea, where I could look to solve the problem? I am using anaconda distribution with cmor 3.3.2.npy1.13.

@doutriaux1
Copy link
Collaborator

That's ineteresting. Same as me. Which conda do you use?

conda --version
conda 4.5.4

@doutriaux1
Copy link
Collaborator

@tommibergman also can you post the result of env

@tommibergman
Copy link
Author

Here you go, conda seems to be the same.

conda --version
conda 4.5.4

BIBINPUTS=.:/Users/bergmant/bib
PROJ_LIB=/Users/bergmant/conda/anaconda2/envs/ece2cmor3/share/proj
_CONDA_SET_PROJ_LIB=PROJ_LIB
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/s2/vnfxv48n15vcgjrgl8r_9fmm0000gn/T/
CONDA_SHLVL=1
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.bzqGcMnBXL/Render
CONDA_PROMPT_MODIFIER=(ece2cmor3)
TERM_PROGRAM_VERSION=361.2
OLDPWD=/Users/bergmant/Documents/codes/cmorize/ece2cmor3
TERM_SESSION_ID=32AF61DB-46AA-472D-B957-51BB6FFC5E58
LC_ALL=en_US.UTF-8
USER=bergmant
UDUNITS2_XML_PATH=/Users/bergmant/conda/anaconda2/envs/ece2cmor3/share/udunits/udunits2.xml
CONDA_EXE=/Users/bergmant/conda/anaconda2/bin/conda
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.YJIG58pkQ9/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
PATH=/Users/bergmant/conda/anaconda2/envs/ece2cmor3/bin:/Users/bergmant/conda/anaconda2/bin:/Users/bergmant/conda/anaconda2/bin:/opt/local/bin:/opt/local/sbin:~/bin/:/opt/local/bin:/opt/local/sbin:/Developer/opt/intel/bin/:/opt/local/libexec/perl5.24/sitebin/:/Users/bergmant/Documents/codes/cedadev-cis-742ea44/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin
HDF5_DISABLE_VERSION_CHECK=1
CONDA_PREFIX=/Users/bergmant/conda/anaconda2/envs/ece2cmor3
PWD=/Users/bergmant/Documents/codes/cmorize/ece2cmor3/ece2cmor3
LANG=UTF-8
XPC_FLAGS=0x0
FS_TRASHER_SOCKET=/private/tmp/com.apple.launchd.XHtOhH4zlm/ListeningSocket
XPC_SERVICE_NAME=0
HOME=/Users/bergmant
SHLVL=1
CONDA_PYTHON_EXE=/Users/bergmant/conda/anaconda2/bin/python
PYTHONPATH=/Users/bergmant/Documents/codes/python/MODIS/:/Users/bergmant/Documents/codes/python/TM5/:/Users/bergmant/Documents/codes/python/:/Users/bergmant/Documents/codes/python/amine:
LOGNAME=bergmant
LC_CTYPE=en_US.UTF-8
CONDA_DEFAULT_ENV=ece2cmor3
DISPLAY=/private/tmp/com.apple.launchd.qxAtz6SWcs/org.macports:0
SECURITYSESSIONID=186a6
_=/usr/bin/env

@doutriaux1 doutriaux1 added this to Needed in Lesser Priorities Jul 18, 2018
@tommibergman
Copy link
Author

With the latest version of the CMOR tables (01.00.27) and with latest CMOR library from Conda (cmor 3.3.3.2018.08.08.14.53.g4103823.npy1.14) I am not anymore experiencing this problem.

Lesser Priorities automation moved this from Needed to Done Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants