Skip to content

update_resource_allocation_table breaks when there is no new rows to insert. #3468

Open
@antgonza

Description

@antgonza
In [11]: update_resource_allocation_table(weeks=20)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 update_resource_allocation_table(weeks=20)

File ~/qiita/qiita_db/util.py:2972, in update_resource_allocation_table(weeks, test)
   2967 df = pd.DataFrame(data)
   2969 # This is important as we are transforming the MaxRSS to raw value
   2970 # so we need to confirm that there is no other suffixes
   2971 print('Make sure that only 0/K/M exist', set(
-> 2972     df.MaxRSS.apply(lambda x: str(x)[-1])))
   2974 # Generating new columns
   2975 df['MaxRSSRaw'] = df.MaxRSS.apply(lambda x: MaxRSS_helper(str(x)))

File ~/miniconda3/envs/qiita/lib/python3.9/site-packages/pandas/core/generic.py:5575, in NDFrame.__getattr__(self, name)
   5568 if (
   5569     name not in self._internal_names_set
   5570     and name not in self._metadata
   5571     and name not in self._accessors
   5572     and self._info_axis._can_hold_identifiers_and_holds_name(name)
   5573 ):
   5574     return self[name]
-> 5575 return object.__getattribute__(self, name)

AttributeError: 'DataFrame' object has no attribute 'MaxRSS'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions