qiita icon indicating copy to clipboard operation
qiita copied to clipboard

update_resource_allocation_table breaks when there is no new rows to insert.

Open antgonza opened this issue 7 months ago • 0 comments
trafficstars

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'

antgonza avatar Apr 21 '25 16:04 antgonza