Uploaded image for project: 'Apache Open Climate Workbench (Retired)'
  1. Apache Open Climate Workbench (Retired)
  2. CLIMATE-934

time_series_with_regions.py Fails With Type Error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • None
    • examples
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              michael.arthur.anderson@gmail.com Michael Anderson
              michael.arthur.anderson@gmail.com Michael Anderson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: