iiab / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
4 stars 5 forks source link

AttributeError: 'CalibreDB' object has no attribute 'update_title_sort' (on Line 245 of cps/editbooks.py) #241

Closed holta closed 3 months ago

holta commented 3 months ago

Arising from upstream changes as merged here:

[2024-08-21 15:35:06,893] DEBUG {cps.services.worker:91} Add Task for user: Admin - Metadata fetch task for https://www.youtube.com/watch?v=M7-h3FO-KKo
[2024-08-21 15:35:06,894]  INFO {cps.tasks.metadata_extract:155} Starting to fetch metadata for URL: https://www.youtube.com/watch?v=M7-h3FO-KKo
[2024-08-21 15:35:11,143] DEBUG {cps.services.worker:91} Add Task for user: Admin - Download task for https://www.youtube.com/watch?v=M7-h3FO-KKo
[2024-08-21 15:35:11,147]  INFO {cps.tasks.download:43} Subprocess args: ['lb-wrapper', 'dl', 'https://www.youtube.com/watch?v=M7-h3FO-KKo']
[2024-08-21 15:35:32,083]  INFO {cps.editbooks:235} Received metadata request: ImmutableMultiDict([('requested_file', '/library/downloads/calibre-web/Youtube/Mark Rober/Testing If You Can Blow Your Own Sail_39.44M_[M7-h3FO-KKo].mp4'), (\
'current_user_name', 'Admin')])
[2024-08-21 15:35:32,083]  INFO {cps.editbooks:237} Requested file: /library/downloads/calibre-web/Youtube/Mark Rober/Testing If You Can Blow Your Own Sail_39.44M_[M7-h3FO-KKo].mp4
[2024-08-21 15:35:32,083]  INFO {cps.editbooks:242} Processing file: <_io.BufferedReader name='/library/downloads/calibre-web/Youtube/Mark Rober/Testing If You Can Blow Your Own Sail_39.44M_[M7-h3FO-KKo].mp4'>
[2024-08-21 15:35:32,083] ERROR {cps.editbooks:319} 'CalibreDB' object has no attribute 'update_title_sort'
Traceback (most recent call last):
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 316, in meta
    resp = move_mediafile(requested_file, current_user_name, shelf_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 245, in move_mediafile
    calibre_db.update_title_sort(config)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CalibreDB' object has no attribute 'update_title_sort'
[2024-08-21 15:35:32,091] ERROR {cps.tasks.download:125} Failed to send the requested file to http://192.168.0.207/books/meta
[2024-08-21 15:35:32,091]  INFO {cps.tasks.download:138} Download task for https://www.youtube.com/watch?v=M7-h3FO-KKo completed successfully

[2024-08-21 15:36:28,002] DEBUG {cps.services.worker:91} Add Task for user: Admin - Metadata fetch task for https://www.youtube.com/watch?v=8MzQjtIkF5g
[2024-08-21 15:36:28,131]  INFO {cps.tasks.metadata_extract:155} Starting to fetch metadata for URL: https://www.youtube.com/watch?v=8MzQjtIkF5g
[2024-08-21 15:36:31,322] DEBUG {cps.services.worker:91} Add Task for user: Admin - Download task for https://www.youtube.com/watch?v=8MzQjtIkF5g
[2024-08-21 15:36:31,322]  INFO {cps.tasks.download:43} Subprocess args: ['lb-wrapper', 'dl', 'https://www.youtube.com/watch?v=8MzQjtIkF5g']
[2024-08-21 15:36:37,761]  INFO {cps.editbooks:235} Received metadata request: ImmutableMultiDict([('data', 'root'), ('sort_param', 'stored'), ('requested_file', '/library/downloads/calibre-web/Youtube/The Wall Street Journal/How Is Tra\
der Joe’s So Cheap and Popular? | WSJ The Economics Of_1.63M_[8MzQjtIkF5g].mp4'), ('current_user_name', 'Admin')])
[2024-08-21 15:36:37,761]  INFO {cps.editbooks:237} Requested file: /library/downloads/calibre-web/Youtube/The Wall Street Journal/How Is Trader Joe’s So Cheap and Popular? | WSJ The Economics Of_1.63M_[8MzQjtIkF5g].mp4
[2024-08-21 15:36:37,761]  INFO {cps.editbooks:242} Processing file: <_io.BufferedReader name='/library/downloads/calibre-web/Youtube/The Wall Street Journal/How Is Trader Joe’s So Cheap and Popular? | WSJ The Economics Of_1.63M_[8MzQ\
jtIkF5g].mp4'>
[2024-08-21 15:36:37,762] ERROR {cps.editbooks:319} 'CalibreDB' object has no attribute 'update_title_sort'
Traceback (most recent call last):
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 316, in meta
    resp = move_mediafile(requested_file, current_user_name, shelf_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/calibre-web-py3/cps/editbooks.py", line 245, in move_mediafile
    calibre_db.update_title_sort(config)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CalibreDB' object has no attribute 'update_title_sort'
[2024-08-21 15:36:37,769] ERROR {cps.tasks.download:125} Failed to send the requested file to http://192.168.0.207/books/meta?data=root&sort_param=stored
[2024-08-21 15:36:37,770]  INFO {cps.tasks.download:138} Download task for https://www.youtube.com/watch?v=8MzQjtIkF5g completed successfully
holta commented 3 months ago

Appears fixed by: