[ https://issues.apache.org/jira/browse/CLIMATE-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16263134#comment-16263134 ]
ASF GitHub Bot commented on CLIMATE-934: ---------------------------------------- GitHub user MichaelArthurAnderson opened a pull request: https://github.com/apache/climate/pull/460 CLIMATE-934 Fixed error with out of date Bounds constructor. CLIMATE-934 - Fixed error with out of date Bounds constructor. - Addressed error with matplotlib and epoch date. - Added Apache license. - Minor Pylint. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MichaelArthurAnderson/climate CLIMATE-934 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/climate/pull/460.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #460 ---- commit 69793310f3ba76fa9165e20a7fd8c8275ade7555 Author: Michael Anderson <michaelanderson@michaels-imac.local> Date: 2017-11-22T18:27:00Z CLIMATE-934 Fixed error with old Bounds constructor. Fixed error with matplotlib and date starting at epoch. Added Apache license. Minor Pylint. ---- > time_series_with_regions.py Fails With Type Error > ------------------------------------------------- > > Key: CLIMATE-934 > URL: https://issues.apache.org/jira/browse/CLIMATE-934 > Project: Apache Open Climate Workbench > Issue Type: Bug > Components: examples > Affects Versions: 1.1.0 > Reporter: Michael Anderson > Assignee: Michael Anderson > > time_series_with_regions.py Fails With: > Traceback (most recent call last): > File "time_series_with_regions.py", line 122, in <module> > Bounds(-10.0, 0.0, 29.0, 36.5), > File "/Users/michaelanderson/Downloads/climate/ocw/dataset.py", line 351, > in __init__ > if boundary_type[:6].upper() == 'CORDEX': > TypeError: 'float' object has no attribute '__getitem__' > The example is constructing the Bounds object like so: > Bounds(-10.0, 0.0, 29.0, 36.5), > However the Bounds constructor looks like so: > def __init__(self, boundary_type='rectangular', > us_states=None, countries=None, > user_mask_file=None, mask_variable_name=None, > longitude_name=None, latitude_name=None, > lat_min=-90, lat_max=90, lon_min=-180, lon_max=180, > start=None, end=None): > So when the Bounds constructor gets here: > if boundary_type[:6].upper() == 'CORDEX': > It is trying to treat an int like an array. -- This message was sent by Atlassian JIRA (v6.4.14#64029)