[BUG] DataProcessor.get_group_data is not working #41

Open
opened 2025-04-16 10:31:11 +00:00 by nuluh · 0 comments
nuluh commented 2025-04-16 10:31:11 +00:00 (Migrated from github.com)

Bug Description

DataProcessor.get_group_data method gives error when called

Steps to Reproduce

from convert import *

a = generate_damage_files_index(
    num_damage=6, file_index_start=1, col=5, base_path="D:/thesis/data/dataset_A"
)
data = DataProcessor(file_index=a)
data.get_group_data(0)

Expected Behavior

The method should return DataFrame

Actual Behavior

The method return AttributeError: 'list' object has no attribute 'get'

Error Logs

>>> data.get_group_data(1)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\Users\damar\OneDrive - Universitas Muhammadiyah Yogyakarta\(0) Kuliah-DAM\thesis\thesis-repo\data\QUGS\convert.py", line 138, in get_group_data
    return self.data.get([group_idx, []])
AttributeError: 'list' object has no attribute 'get'

Component

Data Processing

Version/Commit

58a316d

Environment

No response

Additional Context

No response

### Bug Description `DataProcessor.get_group_data` method gives error when called ### Steps to Reproduce ```py from convert import * a = generate_damage_files_index( num_damage=6, file_index_start=1, col=5, base_path="D:/thesis/data/dataset_A" ) data = DataProcessor(file_index=a) data.get_group_data(0) ``` ### Expected Behavior The method should return DataFrame ### Actual Behavior The method return `AttributeError: 'list' object has no attribute 'get'` ### Error Logs ```shell >>> data.get_group_data(1) Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\Users\damar\OneDrive - Universitas Muhammadiyah Yogyakarta\(0) Kuliah-DAM\thesis\thesis-repo\data\QUGS\convert.py", line 138, in get_group_data return self.data.get([group_idx, []]) AttributeError: 'list' object has no attribute 'get' ``` ### Component Data Processing ### Version/Commit 58a316d ### Environment _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nuluh/thesis#41