diff --git a/cps/metadata_provider/scholar.py b/cps/metadata_provider/scholar.py index 7feb0ee9b..498184ec2 100644 --- a/cps/metadata_provider/scholar.py +++ b/cps/metadata_provider/scholar.py @@ -49,6 +49,8 @@ class scholar(Metadata): tokens = [quote(t.encode("utf-8")) for t in title_tokens] query = " ".join(tokens) try: + scholarly.set_timeout(20) + scholarly.set_retries(2) scholar_gen = itertools.islice(scholarly.search_pubs(query), 10) except Exception as e: log.warning(e) diff --git a/cps/search.py b/cps/search.py index 88d790fc5..17d54b4e0 100644 --- a/cps/search.py +++ b/cps/search.py @@ -134,6 +134,9 @@ def adv_search_read_status(read_status): db_filter = coalesce(db.cc_classes[config.config_read_column].value, False) != True except (KeyError, AttributeError, IndexError): log.error("Custom Column No.{} does not exist in calibre database".format(config.config_read_column)) + flash(_("Custom Column No.%(column)d does not exist in calibre database", + column=config.config_read_column), + category="error") return true() return db_filter diff --git a/optional-requirements.txt b/optional-requirements.txt index 97f355f22..d18463a3c 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -29,11 +29,11 @@ SQLAlchemy-Utils>=0.33.5,<0.39.0 # metadata extraction rarfile>=3.2 -scholarly>=1.2.0,<1.7 +scholarly>=1.2.0,<1.8 markdown2>=2.0.0,<2.5.0 html2text>=2020.1.16,<2022.1.1 python-dateutil>=2.1,<2.9.0 -beautifulsoup4>=4.0.1,<4.11.0 +beautifulsoup4>=4.0.1,<4.12.0 cchardet>=2.0.0,<2.2.0 # Comics @@ -41,4 +41,4 @@ natsort>=2.2.0,<8.2.0 comicapi>=2.2.0,<2.3.0 # Kobo integration -jsonschema>=3.2.0,<4.7.0 +jsonschema>=3.2.0,<4.8.0 diff --git a/setup.cfg b/setup.cfg index 92e64f6a1..c24dfc97d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -97,5 +97,5 @@ comics = natsort>=2.2.0,<8.2.0 comicapi>=2.2.0,<2.3.0 kobo = - jsonschema>=3.2.0,<4.6.0 + jsonschema>=3.2.0,<4.7.0 diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 8953c08ca..7abc87928 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
Start Time: 2022-06-05 22:14:00
+Start Time: 2022-07-18 11:00:52
Stop Time: 2022-06-06 04:06:43
+Stop Time: 2022-07-18 17:02:49
Duration: 4h 57 min
+Duration: 5h 1 min
Traceback (most recent call last):
+ File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 676, in test_calibre_log
+ self.assertTrue("1% Eingabe wird zu HTML konvertiert" in data)
+AssertionError: False is not true
+ Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 223, in test_convert_email - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 254, in test_convert_failed_and_email
- select.select_by_visible_text('AZW3')
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/support/select.py", line 140, in select_by_visible_text
- raise NoSuchElementException("Could not locate element with visible text: %s" % text)
-selenium.common.exceptions.NoSuchElementException: Message: Could not locate element with visible text: AZW3
- Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 622, in test_convert_options - self.assertEqual(from_book, set(['-- select an option --', "TXT"])) -AssertionError: Items in the first set but not the second: -'EPUB' -'AZW3'-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert.py", line 460, in test_email_only - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 226, in test_convert_email - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 244, in test_convert_failed_and_email
- select.select_by_visible_text('AZW3')
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/support/select.py", line 140, in select_by_visible_text
- raise NoSuchElementException("Could not locate element with visible text: %s" % text)
-selenium.common.exceptions.NoSuchElementException: Message: Could not locate element with visible text: AZW3
- Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_ebook_convert_gdrive.py", line 460, in test_email_only - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 185, in test_edit_title
- self.assertEqual('The camicdemo', books[1][8]['title'])
-IndexError: list index out of range
+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_ebooks_gdrive.py", line 230, in test_edit_title
+ self.assertEqual(ele.text, u'Very long extra super turbo cool title without any issue of displaying including รถ utf-8 characters')
+AttributeError: 'bool' object has no attribute 'text'
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_email_STARTTLS.py", line 81, in test_STARTTLS - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_email_STARTTLS.py", line 113, in test_STARTTLS_resend_password - self.assertTrue(wait_Email_received(self.email_server.handler.check_email_received)) -AssertionError: False is not true+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_metadata_scholar.py", line 68, in test_load_metadata + self.assertEqual(30, len(results)) +AssertionError: 30 != 0
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_email_STARTTLS.py", line 54, in tearDownClass
- cls.stop_calibre_web()
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 475, in stop_calibre_web
- cls.driver.find_element(By.ID, 'admin_stop').click()
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1248, in find_element
- return self.execute(Command.FIND_ELEMENT, {
+ File "/home/ozzie/Development/calibre-web-test/test/test_edit_metadata_scholar.py", line 34, in tearDownClass
+ cls.driver.get("http://127.0.0.1:8083")
+ File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 437, in get
+ self.execute(Command.GET, {'url': url})
File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
self.error_handler.check_response(response)
File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"]
+selenium.common.exceptions.TimeoutException: Message: TimedPromise timed out after 300000 ms
Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
- Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 52, in tearDownClass
- cls.stop_calibre_web()
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 475, in stop_calibre_web
- cls.driver.find_element(By.ID, 'admin_stop').click()
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1248, in find_element
- return self.execute(Command.FIND_ELEMENT, {
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
- self.error_handler.check_response(response)
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
- raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="admin_stop"]
-Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
+WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:186:5
+TimeoutError@chrome://remote/content/shared/webdriver/Errors.jsm:475:5
+bail@chrome://remote/content/marionette/sync.js:226:19
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 130, in test_SSL_logging_email
- self.assertTrue(len(re.findall('Subject: Calibre-Web test e-mail', data)), "Email logging not working")
-AssertionError: 0 is not true : Email logging not working
- Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 196, in test_SSL_non_admin_user - self.assertEqual(ret[-1]['result'], 'Finished') -AssertionError: 'Failed' != 'Finished' -- Failed -+ Finished-
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 64, in test_SSL_only
- self.setup_server(False, {'mail_use_ssl': 'SSL/TLS'})
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 722, in setup_server
- select = Select(cls.driver.find_element(By.ID, key))
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1248, in find_element
- return self.execute(Command.FIND_ELEMENT, {
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
- self.error_handler.check_response(response)
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
- raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="mail_use_ssl"]
-Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
- Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 135, in test_email_limit
- self.fill_basic_config({'config_uploading': 1})
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 387, in fill_basic_config
- cls._fill_basic_config(elements)
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 297, 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.8/site-packages/selenium/webdriver/support/wait.py", line 89, in until
- raise TimeoutException(message, screen, stacktrace)
-selenium.common.exceptions.TimeoutException: Message:
-Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
- Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_email_ssl.py", line 217, in test_filepicker_two_file - accordions[0].click() -IndexError: list index out of range-
Traceback (most recent call last): + File "/home/ozzie/Development/calibre-web-test/test/test_error_read_column.py", line 51, in test_invalid_custom_read_column + self.assertTrue(self.check_element_on_page((By.ID, "flash_danger"))) +AssertionError: False is not true+
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_register.py", line 211, in test_forgot_password
- self.assertTrue(self.check_user_logged_in('forget', noCompare=True))
-AssertionError: False is not true
- Traceback (most recent call last): - File "/home/ozzie/Development/calibre-web-test/test/test_register.py", line 222, in test_registering_only_email - self.assertTrue(wait_Email_received(self.email_server.handler.check_email_received)) -AssertionError: False is not true-
Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_register.py", line 132, in test_registering_user
- self.assertEqual(u'flash_success',self.register(u'u1', 'huj@de.de'))
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 124, in register
- username = cls.driver.find_element(By.NAME, "name")
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1248, in find_element
- return self.execute(Command.FIND_ELEMENT, {
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
- self.error_handler.check_response(response)
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
- raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [name="name"]
-Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
- Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_register.py", line 151, in test_registering_user_fail
- self.assertEqual(u'flash_success',self.register(u'udouble', 'huj@de.com'))
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 124, in register
- username = cls.driver.find_element(By.NAME, "name")
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1248, in find_element
- return self.execute(Command.FIND_ELEMENT, {
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
- self.error_handler.check_response(response)
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
- raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [name="name"]
-Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
- Traceback (most recent call last):
- File "/home/ozzie/Development/calibre-web-test/test/test_register.py", line 173, in test_user_change_password
- self.assertEqual(u'flash_success',self.register(u'upasswd', 'passwd@de.com'))
- File "/home/ozzie/Development/calibre-web-test/test/helper_ui.py", line 124, in register
- username = cls.driver.find_element(By.NAME, "name")
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1248, in find_element
- return self.execute(Command.FIND_ELEMENT, {
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
- self.error_handler.check_response(response)
- File "/home/ozzie/Development/calibre-web-test/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
- raise exception_class(message, screen, stacktrace)
-selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [name="name"]
-Stacktrace:
-WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
-NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
-element.find/</<@chrome://remote/content/marionette/element.js:300:16
-