Skip to content

Crash if database is empty  #32

@guerda

Description

@guerda

The web app crashes if the database is empty (besides the general structure)

raw_response = await run_endpoint_function(
        File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.9/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
                            return await dependant.call(**values)
              File "/app/app.py", line 58, in get_general_stats
      file_size_str = humanize.naturalsize(beets_statistics.get_file_size())
                                  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.9/site-packages/humanize/filesize.py", line 91, in naturalsize
                                     abs_bytes = abs(bytes_)
                          TypeError: bad operand type for abs(): 'NoneType'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions