diff --git a/cps/helper.py b/cps/helper.py index 757e48da..ed11e1c0 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -804,8 +804,8 @@ def save_cover_from_url(url, book_path): elif use_advocate: img = advocate.get(url, timeout=(10, 200), allow_redirects=False) # ToDo: Error Handling else: - log.error("python modul advocate is not installed but is needed") - return False, _("Python modul 'advocate' is not installed but is needed for cover downloads") + log.error("python module advocate is not installed but is needed") + return False, _("Python module 'advocate' is not installed but is needed for cover downloads") img.raise_for_status() return save_cover(img, book_path) except (socket.gaierror, diff --git a/cps/updater.py b/cps/updater.py index 757e43fc..13d774bf 100644 --- a/cps/updater.py +++ b/cps/updater.py @@ -266,8 +266,9 @@ class Updater(threading.Thread): if additional_path: exclude.append(additional_path) exclude = tuple(exclude) - # check if we are in a package, rename cps.py to __init__.py + # check if we are in a package, rename cps.py to __init__.py and __main__.py if constants.HOME_CONFIG: + shutil.copy(os.path.join(source, 'cps.py'), os.path.join(source, '__main__.py')) shutil.move(os.path.join(source, 'cps.py'), os.path.join(source, '__init__.py')) for root, dirs, files in os.walk(destination, topdown=True): diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 913913b1..027aaa81 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2022-04-29 21:17:05
+Start Time: 2022-04-30 21:05:13
Stop Time: 2022-04-30 03:15:20
+Stop Time: 2022-05-01 02:54:00
Duration: 5h 5 min
+Duration: 4h 55 min
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 198, in test_convert_email - self.assertTrue("E-mail" in ret[-1]['task']) -AssertionError: False is not true-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 442, in test_thumbnail_cache + File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 443, in test_thumbnail_cache self.assertEqual(10*2, count_files(thumbnail_cache_path)) AssertionError: 20 != 0
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 931, in test_watch_metadata - self.assertNotIn('series', book) -AssertionError: 'series' unexpectedly found in {'id': 5, 'reader': [], 'title': 'testbook', 'author': ['John Döe'], 'rating': 0, 'languages': ['English'], 'identifier': [], 'cover': '/cover/5/og?c=1651263008', 'tag': [], 'publisher': ['Randomhäus'], 'pubdate': 'Jan 19, 2017', 'comment': 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Aenean commodo ligula eget dolor.Aenean massa.Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.Nulla consequat massa quis enim.Donec pede justo, fringilla vel, aliquet nec, vulputate', 'add_shelf': [], 'del_shelf': [], 'edit_enable': True, 'kindle': None, 'kindlebtn': None, 'download': ['EPUB (6.7 kB)'], 'read': False, 'archived': False, 'series_all': 'Book 1 of test', 'series_index': '1', 'series': 'test', 'cust_columns': []}-
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_thumbnails.py", line 135, in test_cover_change_on_upload_new_cover + self.assertGreaterEqual(diff(BytesIO(updated_cover), BytesIO(original_cover), delete_diff_file=True), 0.05) +AssertionError: 0.038404302739168276 not greater than or equal to 0.05+
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_thumbnails.py", line 310, in test_sideloaded_book - self.assertAlmostEqual(diff(BytesIO(list_cover), BytesIO(old_list_cover), delete_diff_file=True), 0.0, -AssertionError: 0.005138437597261127 != 0.0 within 0.0001 delta (0.005138437597261127 difference)+ File "/home/ozzie/Development/calibre-web-test/test/test_thumbnails.py", line 308, in test_sideloaded_book + self.assertGreaterEqual(diff(BytesIO(cover), BytesIO(old_cover), delete_diff_file=True), 0.04) +AssertionError: 0.03724830839072722 not greater than or equal to 0.04
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_updater.py", line 268, in test_check_update_nightly_request_errors - self.check_updater('Could not fetch', "alert") - File "/home/ozzie/Development/calibre-web-test/test/test_updater.py", line 76, in check_updater - self.assertTrue(responsetext in self.check_element_on_page((By.ID, "message")).text) -AttributeError: 'bool' object has no attribute 'text'-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_updater.py", line 363, in test_perform_update - self.assertTrue(thumbail_cache_path) -AssertionError: False is not true-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_updater.py", line 321, in test_perform_update_stable_errors - self.assertTrue('HTTP Error' in self.check_element_on_page((By.ID, "DialogContent")).text) -AssertionError: False is not true-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_updater.py", line 424, in test_update_write_protect - self.assertTrue('Update failed' in self.check_element_on_page((By.ID, "DialogContent")).text) -AssertionError: False is not true-
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 - File "/home/ozzie/Development/calibre-web/cps/__init__.py", line 29, in <module> - from .MyLoginManager import MyLoginManager - File "/home/ozzie/Development/calibre-web/cps/MyLoginManager.py", line 24, in <module> - from flask_login import LoginManager - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/flask_login/__init__.py", line 16, in <module> - from .login_manager import LoginManager - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/flask_login/login_manager.py", line 24, in <module> - from .utils import (login_url as make_login_url, _create_identifier, - File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/flask_login/utils.py", line 13, in <module> - from werkzeug.security import safe_str_cmp -ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security' (/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/werkzeug/security.py)-