diff --git a/cps/admin.py b/cps/admin.py index 045a9523..c9f28e26 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1702,7 +1702,7 @@ def _db_configuration_update_helper(): return _db_configuration_result('{}'.format(ex), gdrive_error) if db_change or not db_valid or not config.db_configured \ - or config.config_calibre_dir != to_save["config_calibre_dir"]: + or config.config_calibre_dir != to_save["config_calibre_dir"]: if not os.path.exists(metadata_db) or not to_save['config_calibre_dir']: return _db_configuration_result(_('DB Location is not Valid, Please Enter Correct Path'), gdrive_error) else: @@ -1725,6 +1725,9 @@ def _db_configuration_update_helper(): calibre_db.update_config(config) if not os.access(os.path.join(config.config_calibre_dir, "metadata.db"), os.W_OK): flash(_("DB is not Writeable"), category="warning") + _config_string(to_save, "config_calibre_split_dir") + config.config_calibre_split = to_save.get('config_calibre_split', 0) == "on" + calibre_db.update_config(config) config.save() return _db_configuration_result(None, gdrive_error) diff --git a/cps/config_sql.py b/cps/config_sql.py index 21644ccd..f6c0991c 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -69,6 +69,8 @@ class _Settings(_Base): config_calibre_dir = Column(String) config_calibre_uuid = Column(String) + config_calibre_split = Column(Boolean, default=False) + config_calibre_split_dir = Column(String) config_port = Column(Integer, default=constants.DEFAULT_PORT) config_external_port = Column(Integer, default=constants.DEFAULT_PORT) config_certfile = Column(String) @@ -389,6 +391,9 @@ class ConfigSQL(object): self.db_configured = False self.save() + def get_book_path(self): + return self.config_calibre_split_dir if self.config_calibre_split_dir else self.config_calibre_dir + def store_calibre_uuid(self, calibre_db, Library_table): try: calibre_uuid = calibre_db.session.query(Library_table).one_or_none() diff --git a/cps/editbooks.py b/cps/editbooks.py old mode 100755 new mode 100644 index b8f6363f..2449eab9 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -126,7 +126,7 @@ def edit_book(book_id): edited_books_id = book.id modify_date = True title_author_error = helper.update_dir_structure(edited_books_id, - config.config_calibre_dir, + config.get_book_path(), input_authors[0], renamed_author=renamed) if title_author_error: @@ -271,7 +271,7 @@ def upload(): meta.extension.lower()) else: error = helper.update_dir_structure(book_id, - config.config_calibre_dir, + config.get_book_path(), input_authors[0], meta.file_path, title_dir + meta.extension.lower(), @@ -321,7 +321,7 @@ def convert_bookformat(book_id): return redirect(url_for('edit-book.show_edit_book', book_id=book_id)) log.info('converting: book id: %s from: %s to: %s', book_id, book_format_from, book_format_to) - rtn = helper.convert_book_format(book_id, config.config_calibre_dir, book_format_from.upper(), + rtn = helper.convert_book_format(book_id, config.get_book_path(), book_format_from.upper(), book_format_to.upper(), current_user.name) if rtn is None: @@ -391,7 +391,7 @@ def edit_list_book(param): elif param == 'title': sort_param = book.sort if handle_title_on_edit(book, vals.get('value', "")): - rename_error = helper.update_dir_structure(book.id, config.config_calibre_dir) + rename_error = helper.update_dir_structure(book.id, config.get_book_path()) if not rename_error: ret = Response(json.dumps({'success': True, 'newValue': book.title}), mimetype='application/json') @@ -409,7 +409,7 @@ def edit_list_book(param): mimetype='application/json') elif param == 'authors': input_authors, __, renamed = handle_author_on_edit(book, vals['value'], vals.get('checkA', None) == "true") - rename_error = helper.update_dir_structure(book.id, config.config_calibre_dir, input_authors[0], + rename_error = helper.update_dir_structure(book.id, config.get_book_path(), input_authors[0], renamed_author=renamed) if not rename_error: ret = Response(json.dumps({ @@ -513,10 +513,10 @@ def merge_list_book(): for element in from_book.data: if element.format not in to_file: # create new data entry with: book_id, book_format, uncompressed_size, name - filepath_new = os.path.normpath(os.path.join(config.config_calibre_dir, + filepath_new = os.path.normpath(os.path.join(config.get_book_path(), to_book.path, to_name + "." + element.format.lower())) - filepath_old = os.path.normpath(os.path.join(config.config_calibre_dir, + filepath_old = os.path.normpath(os.path.join(config.get_book_path(), from_book.path, element.name + "." + element.format.lower())) copyfile(filepath_old, filepath_new) @@ -556,7 +556,7 @@ def table_xchange_author_title(): if edited_books_id: # toDo: Handle error - edit_error = helper.update_dir_structure(edited_books_id, config.config_calibre_dir, input_authors[0], + edit_error = helper.update_dir_structure(edited_books_id, config.get_book_path(), input_authors[0], renamed_author=renamed) if modify_date: book.last_modified = datetime.utcnow() @@ -753,7 +753,7 @@ def move_coverfile(meta, db_book): cover_file = meta.cover else: cover_file = os.path.join(constants.STATIC_DIR, 'generic_cover.jpg') - new_cover_path = os.path.join(config.config_calibre_dir, db_book.path) + new_cover_path = os.path.join(config.get_book_path(), db_book.path) try: os.makedirs(new_cover_path, exist_ok=True) copyfile(cover_file, os.path.join(new_cover_path, "cover.jpg")) @@ -839,7 +839,7 @@ def delete_book_from_table(book_id, book_format, json_response): book = calibre_db.get_book(book_id) if book: try: - result, error = helper.delete_book(book, config.config_calibre_dir, book_format=book_format.upper()) + result, error = helper.delete_book(book, config.get_book_path(), book_format=book_format.upper()) if not result: if json_response: return json.dumps([{"location": url_for("edit-book.show_edit_book", book_id=book_id), @@ -1172,7 +1172,7 @@ def upload_single_file(file_request, book, book_id): return False file_name = book.path.rsplit('/', 1)[-1] - filepath = os.path.normpath(os.path.join(config.config_calibre_dir, book.path)) + filepath = os.path.normpath(os.path.join(config.get_book_path(), book.path)) saved_filename = os.path.join(filepath, file_name + '.' + file_ext) # check if file path exists, otherwise create it, copy file to calibre path and delete temp file diff --git a/cps/epub.py b/cps/epub.py index 50adba59..b45f3e51 100644 --- a/cps/epub.py +++ b/cps/epub.py @@ -48,7 +48,8 @@ def get_epub_layout(book, book_data): 'n': 'urn:oasis:names:tc:opendocument:xmlns:container', 'pkg': 'http://www.idpf.org/2007/opf', } - file_path = os.path.normpath(os.path.join(config.config_calibre_dir, book.path, book_data.name + "." + book_data.format.lower())) + file_path = os.path.normpath(os.path.join(config.get_book_path(), + book.path, book_data.name + "." + book_data.format.lower())) try: epubZip = zipfile.ZipFile(file_path) diff --git a/cps/helper.py b/cps/helper.py index 0c526d01..bd219594 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -781,7 +781,7 @@ def get_book_cover_internal(book, resolution=None): # Send the book cover from the Calibre directory else: - cover_file_path = os.path.join(config.config_calibre_dir, book.path) + cover_file_path = os.path.join(config.get_book_path(), book.path) if os.path.isfile(os.path.join(cover_file_path, "cover.jpg")): return send_from_directory(cover_file_path, "cover.jpg") else: @@ -934,7 +934,7 @@ def save_cover(img, book_path): else: return False, message else: - return save_cover_from_filestorage(os.path.join(config.config_calibre_dir, book_path), "cover.jpg", img) + return save_cover_from_filestorage(os.path.join(config.get_book_path(), book_path), "cover.jpg", img) def do_download_file(book, book_format, client, data, headers): @@ -947,7 +947,7 @@ def do_download_file(book, book_format, client, data, headers): else: abort(404) else: - filename = os.path.join(config.config_calibre_dir, book.path) + filename = os.path.join(config.get_book_path(), book.path) if not os.path.isfile(os.path.join(filename, data.name + "." + book_format)): # ToDo: improve error handling log.error('File not found: %s', os.path.join(filename, data.name + "." + book_format)) diff --git a/cps/kobo.py b/cps/kobo.py index 0a968081..9900200e 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -205,7 +205,7 @@ def HandleSyncRequest(): for book in books: formats = [data.format for data in book.Books.data] if 'KEPUB' not in formats and config.config_kepubifypath and 'EPUB' in formats: - helper.convert_book_format(book.Books.id, config.config_calibre_dir, 'EPUB', 'KEPUB', current_user.name) + helper.convert_book_format(book.Books.id, config.get_book_path(), 'EPUB', 'KEPUB', current_user.name) kobo_reading_state = get_or_create_reading_state(book.Books.id) entitlement = { diff --git a/cps/static/js/kthoom.js b/cps/static/js/kthoom.js index 67b18fc1..b7ed6c8b 100644 --- a/cps/static/js/kthoom.js +++ b/cps/static/js/kthoom.js @@ -179,8 +179,9 @@ kthoom.ImageFile = function(file) { }; function updateDirectionButtons(){ - var left, right = 1; - if (currentImage == 0 ) { + var left = 1; + var right = 1; + if (currentImage <= 0 ) { if (settings.direction === 0) { left = 0; } else { diff --git a/cps/tasks/convert.py b/cps/tasks/convert.py old mode 100755 new mode 100644 index df6ae104..7b2c8718 --- a/cps/tasks/convert.py +++ b/cps/tasks/convert.py @@ -62,11 +62,11 @@ class TaskConvert(CalibreTask): df = gdriveutils.getFileFromEbooksFolder(cur_book.path, data.name + "." + self.settings['old_book_format'].lower()) if df: - datafile = os.path.join(config.config_calibre_dir, + datafile = os.path.join(config.get_book_path(), cur_book.path, data.name + "." + self.settings['old_book_format'].lower()) - if not os.path.exists(os.path.join(config.config_calibre_dir, cur_book.path)): - os.makedirs(os.path.join(config.config_calibre_dir, cur_book.path)) + if not os.path.exists(os.path.join(config.get_book_path(), cur_book.path)): + os.makedirs(os.path.join(config.get_book_path(), cur_book.path)) df.GetContentFile(datafile) worker_db.session.close() else: diff --git a/cps/tasks/mail.py b/cps/tasks/mail.py old mode 100755 new mode 100644 index a305b623..36133ccf --- a/cps/tasks/mail.py +++ b/cps/tasks/mail.py @@ -239,7 +239,7 @@ class TaskEmail(CalibreTask): @classmethod def _get_attachment(cls, book_path, filename): """Get file as MIMEBase message""" - calibre_path = config.config_calibre_dir + calibre_path = config.get_book_path() if config.config_use_google_drive: df = gdriveutils.getFileFromEbooksFolder(book_path, filename) if df: diff --git a/cps/tasks/metadata_backup.py b/cps/tasks/metadata_backup.py index 1751feeb..45015ccf 100644 --- a/cps/tasks/metadata_backup.py +++ b/cps/tasks/metadata_backup.py @@ -114,7 +114,7 @@ class TaskBackupMetadata(CalibreTask): True) else: # ToDo: Handle book folder not found or not readable - book_metadata_filepath = os.path.join(config.config_calibre_dir, book.path, 'metadata.opf') + book_metadata_filepath = os.path.join(config.get_book_path(), book.path, 'metadata.opf') # prepare finalize everything and output doc = etree.ElementTree(package) try: diff --git a/cps/tasks/thumbnail.py b/cps/tasks/thumbnail.py index 6d11fe97..dd9ee1e0 100644 --- a/cps/tasks/thumbnail.py +++ b/cps/tasks/thumbnail.py @@ -209,7 +209,7 @@ class TaskGenerateCoverThumbnails(CalibreTask): if stream is not None: stream.close() else: - book_cover_filepath = os.path.join(config.config_calibre_dir, book.path, 'cover.jpg') + book_cover_filepath = os.path.join(config.get_book_path(), book.path, 'cover.jpg') if not os.path.isfile(book_cover_filepath): raise Exception('Book cover file not found') @@ -404,7 +404,7 @@ class TaskGenerateSeriesThumbnails(CalibreTask): if stream is not None: stream.close() - book_cover_filepath = os.path.join(config.config_calibre_dir, book.path, 'cover.jpg') + book_cover_filepath = os.path.join(config.get_book_path(), book.path, 'cover.jpg') if not os.path.isfile(book_cover_filepath): raise Exception('Book cover file not found') diff --git a/cps/templates/config_db.html b/cps/templates/config_db.html index 0090bd95..6e54d97c 100644 --- a/cps/templates/config_db.html +++ b/cps/templates/config_db.html @@ -16,6 +16,18 @@ +
Start Time: 2023-10-16 19:38:22
+Start Time: 2023-11-07 19:32:08
Stop Time: 2023-10-17 02:18:49
+Stop Time: 2023-11-08 00:42:45
Duration: 5h 37 min
+Duration: 4h 11 min
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_backup_metadata.py", line 308, in test_backup_change_book_description + self.assertEqual(metadata['description'], "") +AssertionError: '<p><strong>Test</strong></p>' != ''+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 312, in test_change_upload_formats + self.fill_basic_config({'config_upload_formats': 'txt,pdf,epub,kepub,mobi,azw,azw3,cbr,cbz,cbt,djvu,prc,doc,' + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 388, in _fill_basic_config + ele.clear() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py", line 116, in clear + self._execute(Command.CLEAR_ELEMENT) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webelement.py", line 403, in _execute + return self._parent.execute(command, params) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute + self.error_handler.check_response(response) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response + raise exception_class(message, screen, stacktrace) +selenium.common.exceptions.ElementNotInteractableException: Message: Element <input id="config_upload_formats" class="form-control" name="config_upload_formats" type="text"> could not be scrolled into view +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:349:5 +interaction.clearElement@chrome://remote/content/marionette/interaction.sys.mjs:343:11 +clearElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:193:22 +receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:80:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 802, in test_delete_role + self.assertTrue(self.delete_book_format(12, 'FB2')) +AssertionError: False is not true+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 826, in test_title_sort + self.fill_view_config({'config_title_regex': '^(Beta)\s+'}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 432, in fill_view_config + accordions[o].click() +IndexError: list index out of range+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 100, in test_upload_cbz_coverformats + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 303, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 663, in test_upload_edit_role + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 303, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 229, in test_upload_metadata_cb7 + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 303, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 156, in test_upload_metadata_cbr + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 303, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 197, in test_upload_metadata_cbt + self.fill_basic_config({'config_uploading': 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 303, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 384, in test_writeonly_path + self.fill_basic_config({'config_rarfile_location': unrar_path(), "config_unicode_filename": 1}) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 399, in fill_basic_config + cls._fill_basic_config(elements) + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 303, in _fill_basic_config + WebDriverWait(cls.driver, 5).until(EC.presence_of_element_located((By.ID, "config_port"))) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 95, in until + raise TimeoutException(message, screen, stacktrace) +selenium.common.exceptions.TimeoutException: Message: +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_edit_additional_books.py", line 48, in tearDownClass + cls.stop_calibre_web() + File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 487, in stop_calibre_web + cls.driver.find_element(By.ID, 'admin_stop').click() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 830, in find_element + return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute + self.error_handler.check_response(response) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response + raise exception_class(message, screen, stacktrace) +selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"] +Stacktrace: +RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 +WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 +NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:507:5 +dom.find/</<@chrome://remote/content/shared/DOM.sys.mjs:132:16+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn + conn = connection.create_connection( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection + raise err + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection + sock.connect(sa) +ConnectionRefusedError: [Errno 111] Connection refused + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen + httplib_response = self._make_request( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request + conn.request(method, url, **httplib_request_kw) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request + super(HTTPConnection, self).request(method, url, body=body, headers=headers) + File "/usr/lib/python3.10/http/client.py", line 1283, in request + self._send_request(method, url, body, headers, encode_chunked) + File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request + self.endheaders(body, encode_chunked=encode_chunked) + File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders + self._send_output(message_body, encode_chunked=encode_chunked) + File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output + self.send(msg) + File "/usr/lib/python3.10/http/client.py", line 976, in send + self.connect() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect + conn = self._new_conn() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn + raise NewConnectionError( +urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f029472ee00>: Failed to establish a new connection: [Errno 111] Connection refused + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_thumbnail_env.py", line 45, in tearDownClass + cls.driver.get("http://127.0.0.1:8083") + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 449, in get + self.execute(Command.GET, {"url": url}) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 438, in execute + response = self.command_executor.execute(driver_command, params) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py", line 290, in execute + return self._request(command_info[0], url, body=data) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py", line 311, in _request + response = self._conn.request(method, url, body=body, headers=headers) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/request.py", line 78, in request + return self.request_encode_body( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/request.py", line 170, in request_encode_body + return self.urlopen(method, url, **extra_kw) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/poolmanager.py", line 376, in urlopen + response = conn.urlopen(method, u.request_uri, **kw) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 815, in urlopen + return self.urlopen( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 815, in urlopen + return self.urlopen( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 815, in urlopen + return self.urlopen( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen + retries = retries.increment( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment + raise MaxRetryError(_pool, url, error or ResponseError(cause)) +urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=45161): Max retries exceeded with url: /session/c07742ed-3422-4a0a-8af9-b0c6c57aaaa8/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f029472ee00>: Failed to establish a new connection: [Errno 111] Connection refused'))+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn + conn = connection.create_connection( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection + raise err + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection + sock.connect(sa) +ConnectionRefusedError: [Errno 111] Connection refused + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen + httplib_response = self._make_request( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request + conn.request(method, url, **httplib_request_kw) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request + super(HTTPConnection, self).request(method, url, body=body, headers=headers) + File "/usr/lib/python3.10/http/client.py", line 1283, in request + self._send_request(method, url, body, headers, encode_chunked) + File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request + self.endheaders(body, encode_chunked=encode_chunked) + File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders + self._send_output(message_body, encode_chunked=encode_chunked) + File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output + self.send(msg) + File "/usr/lib/python3.10/http/client.py", line 976, in send + self.connect() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect + conn = self._new_conn() + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn + raise NewConnectionError( +urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0294ab48b0>: Failed to establish a new connection: [Errno 111] Connection refused + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_thumbnails.py", line 47, in tearDownClass + cls.driver.get("http://127.0.0.1:8083") + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 449, in get + self.execute(Command.GET, {"url": url}) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 438, in execute + response = self.command_executor.execute(driver_command, params) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py", line 290, in execute + return self._request(command_info[0], url, body=data) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/selenium/webdriver/remote/remote_connection.py", line 311, in _request + response = self._conn.request(method, url, body=body, headers=headers) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/request.py", line 78, in request + return self.request_encode_body( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/request.py", line 170, in request_encode_body + return self.urlopen(method, url, **extra_kw) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/poolmanager.py", line 376, in urlopen + response = conn.urlopen(method, u.request_uri, **kw) + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 815, in urlopen + return self.urlopen( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 815, in urlopen + return self.urlopen( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 815, in urlopen + return self.urlopen( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen + retries = retries.increment( + File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment + raise MaxRetryError(_pool, url, error or ResponseError(cause)) +urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=47647): Max retries exceeded with url: /session/b4d2729b-51dc-47f9-b07a-52f878c5bf78/url (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0294ab48b0>: Failed to establish a new connection: [Errno 111] Connection refused'))+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_upload_epubs.py", line 25, in setUpClass + startup(cls, cls.py_version, {'config_calibre_dir': TEST_DB, 'config_uploading': 1}, + File "/home/ozzie/Development/calibre-web-test/test/helper_func.py", line 186, in startup + inst.p = process_open(command, [1], sout=None, env=env, cwd=work_path) + File "/home/ozzie/Development/calibre-web-test/test/subproc_wrapper.py", line 30, in process_open + return subprocess.Popen(exc_command, + File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ + self._execute_child(args, executable, preexec_fn, close_fds, + File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child + raise child_exception_type(errno_num, err_msg, err_filename) +FileNotFoundError: [Errno 2] No such file or directory: '/home/ozzie/Development/calibre-web/venv/bin/python3' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_upload_epubs.py", line 30, in setUpClass + cls.driver.quit() +AttributeError: 'NoneType' object has no attribute 'quit'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_user_list.py", line 53, in setUpClass + startup(cls, cls.py_version, {'config_calibre_dir': TEST_DB, "config_uploading": 1}, env = {"APP_MODE": "test"}) + File "/home/ozzie/Development/calibre-web-test/test/helper_func.py", line 186, in startup + inst.p = process_open(command, [1], sout=None, env=env, cwd=work_path) + File "/home/ozzie/Development/calibre-web-test/test/subproc_wrapper.py", line 30, in process_open + return subprocess.Popen(exc_command, + File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ + self._execute_child(args, executable, preexec_fn, close_fds, + File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child + raise child_exception_type(errno_num, err_msg, err_filename) +FileNotFoundError: [Errno 2] No such file or directory: '/home/ozzie/Development/calibre-web/venv/bin/python3' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_user_list.py", line 57, in setUpClass + cls.driver.quit() +AttributeError: 'NoneType' object has no attribute 'quit'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_user_load.py", line 61, in setUpClass + startup(cls, cls.py_version, {'config_calibre_dir': TEST_DB, 'config_access_log': 1}, + File "/home/ozzie/Development/calibre-web-test/test/helper_func.py", line 186, in startup + inst.p = process_open(command, [1], sout=None, env=env, cwd=work_path) + File "/home/ozzie/Development/calibre-web-test/test/subproc_wrapper.py", line 30, in process_open + return subprocess.Popen(exc_command, + File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ + self._execute_child(args, executable, preexec_fn, close_fds, + File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child + raise child_exception_type(errno_num, err_msg, err_filename) +FileNotFoundError: [Errno 2] No such file or directory: '/home/ozzie/Development/calibre-web/venv/bin/python3' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_user_load.py", line 66, in setUpClass + cls.driver.quit() +AttributeError: 'NoneType' object has no attribute 'quit'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_user_template.py", line 20, in setUpClass + startup(cls, cls.py_version, {'config_calibre_dir': TEST_DB}, env = {"APP_MODE": "test"}) + File "/home/ozzie/Development/calibre-web-test/test/helper_func.py", line 186, in startup + inst.p = process_open(command, [1], sout=None, env=env, cwd=work_path) + File "/home/ozzie/Development/calibre-web-test/test/subproc_wrapper.py", line 30, in process_open + return subprocess.Popen(exc_command, + File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ + self._execute_child(args, executable, preexec_fn, close_fds, + File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child + raise child_exception_type(errno_num, err_msg, err_filename) +FileNotFoundError: [Errno 2] No such file or directory: '/home/ozzie/Development/calibre-web/venv/bin/python3' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_user_template.py", line 22, in setUpClass + cls.driver.quit() +AttributeError: 'NoneType' object has no attribute 'quit'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_visiblilitys.py", line 25, in setUpClass + startup(cls, cls.py_version, {'config_calibre_dir': TEST_DB}, env = {"APP_MODE": "test"}) + File "/home/ozzie/Development/calibre-web-test/test/helper_func.py", line 186, in startup + inst.p = process_open(command, [1], sout=None, env=env, cwd=work_path) + File "/home/ozzie/Development/calibre-web-test/test/subproc_wrapper.py", line 30, in process_open + return subprocess.Popen(exc_command, + File "/usr/lib/python3.10/subprocess.py", line 971, in __init__ + self._execute_child(args, executable, preexec_fn, close_fds, + File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child + raise child_exception_type(errno_num, err_msg, err_filename) +FileNotFoundError: [Errno 2] No such file or directory: '/home/ozzie/Development/calibre-web/venv/bin/python3' + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_visiblilitys.py", line 27, in setUpClass + cls.driver.quit() +AttributeError: 'NoneType' object has no attribute 'quit'+
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_zz_helper.py", line 30, in setUpClass + from cps import cli_param +ImportError: cannot import name 'cli_param' from 'cps' (unknown location)+