Skip to content

[Bug]: Search, page move error when library is not loaded #546

Closed
@Roc25

Description

@Roc25

Checklist

  • I am using an up-to-date version.
  • I have read the documentation.
  • I have searched existing issues.

TagStudio Version

Alpha 9.5.0

Operating System & Version

Arch Linux

Description

When using the "page move" and "search" buttons an app throw error in console if the library is not loaded

Expected Behavior

The library should be checked and if it is not loaded, then display this message in the console

Steps to Reproduce

  1. Start app and don't load library
  2. Press on "Search" or "Page move" buttons
  3. Look at console

Logs

Traceback (most recent call last):
  File "/home/gred/TagStudio/tagstudio/src/qt/ts_qt.py", line 532, in <lambda>
    forward_button.clicked.connect(lambda: self.page_move(1))
                                           ^^^^^^^^^^^^^^^^^
  File "/home/gred/TagStudio/tagstudio/src/qt/ts_qt.py", line 878, in page_move
    self.filter_items()
  File "/home/gred/TagStudio/tagstudio/src/qt/ts_qt.py", line 1035, in filter_items
    assert self.lib.engine
           ^^^^^^^^^^^^^^^
AttributeError: 'Library' object has no attribute 'engine'
Traceback (most recent call last):
  File "/home/gred/TagStudio/tagstudio/src/qt/ts_qt.py", line 506, in <lambda>
    lambda: self.filter_items(FilterState(query=self.main_window.searchField.text()))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/gred/TagStudio/tagstudio/src/qt/ts_qt.py", line 1035, in filter_items
    assert self.lib.engine
           ^^^^^^^^^^^^^^^
AttributeError: 'Library' object has no attribute 'engine'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as intendedType: UI/UXUser interface and/or user experience

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions