Skip to content

AttributeError: 'list' object has no attribute 'get' #2

@DanOBrien

Description

@DanOBrien

When running the full_project_book_database.py with any records stored in the library.csv, I get the following error.

python3 full_project_book_database.py

Traceback (most recent call last):
File "full_project_book_database.py", line 21, in
current_ID = data[:-1].get("ID")
AttributeError: 'list' object has no attribute 'get'

If I change line 21 from
current_ID = data[:-1].get("ID")
to
current_ID = row['ID']

the script works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions