cedadev/cf-checker

TypeError raised when running CF-checker in python3 environment

Closed this issue · 2 comments

The below TypeError is raised when running CF-checker in locally installed python3 environment. The listed dependencies are present (full list of conda environment modules).

The file being run is the same as in issue #76, with the terminal command below.

cfchecks <name of NetCDF file>

The latest master branch cf-checker was successfully installed with no issues (via python setup.py install).

"

Traceback (most recent call last):
File "/users/ts551/scratch/conda_local/envs/py_3_7_master/bin/cfchecks", line 11, in
load_entry_point('cfchecker==3.1.3', 'console_scripts', 'cfchecks')()
File "/users/ts551/scratch/conda_local/envs/py_3_7_master/lib/python3.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/users/ts551/scratch/conda_local/envs/py_3_7_master/lib/python3.7/site-packages/pkg_resources/init.py", line 2852, in load_entry_point
return ep.load()
File "/users/ts551/scratch/conda_local/envs/py_3_7_master/lib/python3.7/site-packages/pkg_resources/init.py", line 2443, in load
return self.resolve()
File "/users/ts551/scratch/conda_local/envs/py_3_7_master/lib/python3.7/site-packages/pkg_resources/init.py", line 2449, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/mnt/lustre/users/ts551/conda_local/envs/py_3_7_master/lib/python3.7/site-packages/cfchecker-3.1.3-py3.7.egg/cfchecker/cfchecks.py", line 140, in
newest_version = max(cfVersions)
TypeError: '>' not supported between instances of 'CFVersion' and 'CFVersion'

"

@tsherwen CF Checker version 3.1.3 is not python3 compatible. The first version that works with python3 is 4.0.0 which I released on 9th October.

It doesn't look to have made it onto conda yet which I'll need to look at, but is available for download from PyPI.

Regards,
Ros.

@RosalynHatcher thanks for the quick reply!

I've downloaded via pip it is working fine.

To confirm I originally installed via option 3 in the README, via direct by cloning the github and using setup.py, and not by conda.

Cheers,

Tomas