Skip to content

updated databooks after RRs corrected #228

updated databooks after RRs corrected

updated databooks after RRs corrected #228

GitHub Actions / JUnit Test Report failed Mar 18, 2024 in 0s

412 tests run, 0 passed, 0 skipped, 412 failed.

Annotations

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/demo_region1_input.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9fb32d90>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...y: None
      name: 'demo_region1_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9ea92790>
country = None, region = None, name = 'demo_region1_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.04200
1-5 months          0.04200
6-11 months         0.32802
12-23 months        0.30639
24-59 ... 0.18774
WRA: 30-39 years    0.18186
WRA: 40-49 years    0.18564
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/demo_region1_input.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9fb32d90>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...y: None
      name: 'demo_region1_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9ea92790>
country = None, region = None, name = 'demo_region1_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/HND_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f46bffd0>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'HND_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f5d8d150>
country = None, region = None, name = 'HND_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.402419
1-5 months          0.383701
6-11 months         0.383701
12-23 months        0.180120
24...110472
WRA: 30-39 years    0.110472
WRA: 40-49 years    0.110472
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/HND_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f46bffd0>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'HND_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f5d8d150>
country = None, region = None, name = 'HND_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/demo_national_input.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9d60c110>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...: None
      name: 'demo_national_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d60d190>
country = None, region = None, name = 'demo_national_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.04200
1-5 months          0.04200
6-11 months         0.32802
12-23 months        0.30639
24-59 ... 0.18774
WRA: 30-39 years    0.18186
WRA: 40-49 years    0.18564
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/demo_national_input.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9d60c110>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...: None
      name: 'demo_national_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d60d190>
country = None, region = None, name = 'demo_national_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/FJI_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f43c9d50>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'FJI_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f6ac4050>
country = None, region = None, name = 'FJI_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.281067
1-5 months          0.267275
6-11 months         0.267275
12-23 months        0.176205
24...147781
WRA: 30-39 years    0.147781
WRA: 40-49 years    0.147781
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/FJI_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f43c9d50>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'FJI_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f6ac4050>
country = None, region = None, name = 'FJI_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/demo_region3_input.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9d32e390>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...y: None
      name: 'demo_region3_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d80b890>
country = None, region = None, name = 'demo_region3_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.04200
1-5 months          0.04200
6-11 months         0.32802
12-23 months        0.30639
24-59 ... 0.18774
WRA: 30-39 years    0.18186
WRA: 40-49 years    0.18564
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/demo_region3_input.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9d32e390>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...y: None
      name: 'demo_region3_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d80b890>
country = None, region = None, name = 'demo_region3_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/GIN_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f5227a10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'GIN_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f3e2acd0>
country = None, region = None, name = 'GIN_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.332988
1-5 months          0.326967
6-11 months         0.326967
12-23 months        0.322248
24...177751
WRA: 30-39 years    0.177751
WRA: 40-49 years    0.177751
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/GIN_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f5227a10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'GIN_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f3e2acd0>
country = None, region = None, name = 'GIN_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/demo_region2_input.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9e762e10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...y: None
      name: 'demo_region2_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d8b6490>
country = None, region = None, name = 'demo_region2_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.04200
1-5 months          0.04200
6-11 months         0.32802
12-23 months        0.30639
24-59 ... 0.18774
WRA: 30-39 years    0.18186
WRA: 40-49 years    0.18564
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/demo_region2_input.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9e762e10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...y: None
      name: 'demo_region2_input'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d8b6490>
country = None, region = None, name = 'demo_region2_input'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/GHA_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f697bf10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'GHA_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f4ab1b90>
country = None, region = None, name = 'GHA_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.298621
1-5 months          0.293452
6-11 months         0.293452
12-23 months        0.257842
24...178630
WRA: 30-39 years    0.178630
WRA: 40-49 years    0.178630
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/GHA_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f697bf10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'GHA_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f4ab1b90>
country = None, region = None, name = 'GHA_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/MAR_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9e77a790>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'MAR_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768ec5e1d350>
country = None, region = None, name = 'MAR_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.205604
1-5 months          0.221003
6-11 months         0.221003
12-23 months        0.191467
24...204014
WRA: 30-39 years    0.204014
WRA: 40-49 years    0.204014
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/MAR_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9e77a790>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'MAR_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768ec5e1d350>
country = None, region = None, name = 'MAR_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/VCT_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f3fcfa10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'VCT_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f5990b10>
country = None, region = None, name = 'VCT_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.216081
1-5 months          0.200635
6-11 months         0.200635
12-23 months        0.152311
24...134801
WRA: 30-39 years    0.134801
WRA: 40-49 years    0.134801
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/VCT_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f3fcfa10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'VCT_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f5990b10>
country = None, region = None, name = 'VCT_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/BWA_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9dd03690>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'BWA_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9e180110>
country = None, region = None, name = 'BWA_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.330491
1-5 months          0.319460
6-11 months         0.319460
12-23 months        0.194597
24...159728
WRA: 30-39 years    0.159728
WRA: 40-49 years    0.159728
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/BWA_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9dd03690>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'BWA_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9e180110>
country = None, region = None, name = 'BWA_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/MDV_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f45c9b10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'MDV_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f422af50>
country = None, region = None, name = 'MDV_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.302369
1-5 months          0.291307
6-11 months         0.291307
12-23 months        0.136221
24...233886
WRA: 30-39 years    0.233886
WRA: 40-49 years    0.233886
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/MDV_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f45c9b10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'MDV_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f422af50>
country = None, region = None, name = 'MDV_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/KAZ_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9d780a50>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'KAZ_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d782c10>
country = None, region = None, name = 'KAZ_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.268053
1-5 months          0.255320
6-11 months         0.255320
12-23 months        0.147312
24...188983
WRA: 30-39 years    0.188983
WRA: 40-49 years    0.188983
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/KAZ_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9d780a50>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'KAZ_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9d782c10>
country = None, region = None, name = 'KAZ_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/SRB_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f44d2190>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'SRB_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f422a1d0>
country = None, region = None, name = 'SRB_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.251294
1-5 months          0.259957
6-11 months         0.259957
12-23 months        0.112467
24...169497
WRA: 30-39 years    0.169497
WRA: 40-49 years    0.169497
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/SRB_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f44d2190>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'SRB_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f422a1d0>
country = None, region = None, name = 'SRB_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/TKM_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9ef22e50>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'TKM_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768eb06c3590>
country = None, region = None, name = 'TKM_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.248832
1-5 months          0.234471
6-11 months         0.234471
12-23 months        0.124810
24...193074
WRA: 30-39 years    0.193074
WRA: 40-49 years    0.193074
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/TKM_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9ef22e50>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'TKM_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768eb06c3590>
country = None, region = None, name = 'TKM_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/TLS_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f41a5110>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'TLS_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d1046d8790>
country = None, region = None, name = 'TLS_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.495449
1-5 months          0.491582
6-11 months         0.491582
12-23 months        0.422802
24...245312
WRA: 30-39 years    0.245312
WRA: 40-49 years    0.245312
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/TLS_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f41a5110>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'TLS_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d1046d8790>
country = None, region = None, name = 'TLS_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/UKR_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9e761750>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'UKR_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9e4a72d0>
country = None, region = None, name = 'UKR_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.259355
1-5 months          0.235968
6-11 months         0.235968
12-23 months        0.094978
24...151948
WRA: 30-39 years    0.151948
WRA: 40-49 years    0.151948
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/UKR_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9e761750>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'UKR_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9e4a72d0>
country = None, region = None, name = 'UKR_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/RUS_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f469f710>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'RUS_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f6c50810>
country = None, region = None, name = 'RUS_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.214553
1-5 months          0.199563
6-11 months         0.199563
12-23 months        0.099390
24...152854
WRA: 30-39 years    0.152854
WRA: 40-49 years    0.152854
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/RUS_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f469f710>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'RUS_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f6c50810>
country = None, region = None, name = 'RUS_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/CAF_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9d097b90>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'CAF_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768ec5e1dd10>
country = None, region = None, name = 'CAF_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.367462
1-5 months          0.368832
6-11 months         0.368832
12-23 months        0.308196
24...201207
WRA: 30-39 years    0.201207
WRA: 40-49 years    0.201207
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/CAF_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9d097b90>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'CAF_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768ec5e1dd10>
country = None, region = None, name = 'CAF_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/MKD_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f3d77a10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'MKD_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d1077915d0>
country = None, region = None, name = 'MKD_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.206755
1-5 months          0.204990
6-11 months         0.204990
12-23 months        0.106513
24...151815
WRA: 30-39 years    0.151815
WRA: 40-49 years    0.151815
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/MKD_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f3d77a10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'MKD_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d1077915d0>
country = None, region = None, name = 'MKD_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/COG_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9dc3a4d0>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'COG_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9fedb7d0>
country = None, region = None, name = 'COG_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.344343
1-5 months          0.344192
6-11 months         0.344192
12-23 months        0.244407
24...223449
WRA: 30-39 years    0.223449
WRA: 40-49 years    0.223449
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/COG_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9dc3a4d0>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'COG_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9fedb7d0>
country = None, region = None, name = 'COG_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/CIV_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f35033d0>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'CIV_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d11c8d9690>
country = None, region = None, name = 'CIV_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.522353
1-5 months          0.521366
6-11 months         0.521366
12-23 months        0.420610
24...080028
WRA: 30-39 years    0.080028
WRA: 40-49 years    0.080028
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/CIV_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f35033d0>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'CIV_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d11c8d9690>
country = None, region = None, name = 'CIV_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/KHM_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9fe8da90>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'KHM_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9e751690>
country = None, region = None, name = 'KHM_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.377594
1-5 months          0.363786
6-11 months         0.363786
12-23 months        0.276203
24...217843
WRA: 30-39 years    0.217843
WRA: 40-49 years    0.217843
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/KHM_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9fe8da90>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'KHM_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9e751690>
country = None, region = None, name = 'KHM_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/PER_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x75d0f444fa10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'PER_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f35011d0>
country = None, region = None, name = 'PER_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.550654
1-5 months          0.528690
6-11 months         0.528690
12-23 months        0.268023
24...109769
WRA: 30-39 years    0.109769
WRA: 40-49 years    0.109769
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/PER_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x75d0f444fa10>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'PER_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x75d0f35011d0>
country = None, region = None, name = 'PER_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception

Check failure on line 14 in tests/test_tox_databooks.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_tox_databooks.test_databook[en/LiST countries/WSM_databook.xlsx]

Exception: Error in databook: 'Series' object has no attribute 'iteritems'
Raw output
self = <nutrition.data.Dataset at 0x768e9d70e190>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'WSM_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9dad9a50>
country = None, region = None, name = 'WSM_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
>           self.demographic_data = DemographicData(databook, self.calcscache)

../nutrition/data.py:995: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/data.py:142: in __init__
    self.get_risk_dist()
../nutrition/utils.py:85: in wrapper
    return f(*args, **kwargs)
../nutrition/data.py:321: in get_risk_dist
    for age, prev in anaem.iteritems():
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <1 month            0.315784
1-5 months          0.305781
6-11 months         0.305781
12-23 months        0.188927
24...174640
WRA: 30-39 years    0.174640
WRA: 40-49 years    0.174640
Name: (Anaemia, Prevalence of anaemia), dtype: float64
name = 'iteritems'

    @final
    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'Series' object has no attribute 'iteritems'

/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pandas/core/generic.py:6296: AttributeError

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

path = PosixPath('/home/runner/work/Nutrition/Nutrition/inputs/en/LiST countries/WSM_databook.xlsx')

    @pytest.mark.parametrize('path', excel_files, ids=lambda x: str(x.relative_to(inputdir)))
    def test_databook(path):
        P = nu.Project("test")
>       P.load_data(inputspath=path)

test_tox_databooks.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../nutrition/project.py:175: in load_data
    dataset = Dataset(databook=databook, country=country, region=region, name=name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <nutrition.data.Dataset at 0x768e9d70e190>
[<class 'nutrition.data.Dataset'>]
————————————————————————————————————————...country: None
      name: 'WSM_databook'
    region: None
————————————————————————————————————————————————————————————

databook = <pandas.io.excel._base.ExcelFile object at 0x768e9dad9a50>
country = None, region = None, name = 'WSM_databook'

    def __init__(self, databook: pandas.ExcelFile, country=None, region=None, name=None):
        """
        :param databook: Databook that is being used in the model
        :param country: The country of interest for data
        :param region: The region of interest in the country (in geospatial optimization)
        :param name:
        """
    
        self.country = country
        self.region = region
        self.name = name
    
        self.calcscache = CalcCellCache()
    
        # Read them into actual data
        try:
            self.demographic_data = DemographicData(databook, self.calcscache)
        except Exception as E:
>           raise Exception("Error in databook: %s" % str(E)) from E
E           Exception: Error in databook: 'Series' object has no attribute 'iteritems'

../nutrition/data.py:997: Exception