Second-Hand-Friends / kleinanzeigen-bot

A dilligent command line tool to publish ads on kleinanzeigen.de
GNU Affero General Public License v3.0
202 stars 44 forks source link

Publishing to Mode & Beauty > Herrenbekleidung failes #195

Closed DreckSoft closed 11 months ago

DreckSoft commented 1 year ago

Pubishing to category 153/160/shirts always failes.

I thing that contrary to the log setting kleidung_herren.condition_s already failes. Therefore the dialog stays open and the subsequent action of selecting shipping options failes.

[DEBUG] Successfully set attribute field [kleidung_herren.condition_s] to [like_new]...
[DEBUG]  ... pausing for 1262 ms ...
[DEBUG] Message: Element xpath://*[contains(@class, "CarrierSelectionModal--Button")] not found or not clickable; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception

Traceback (most recent call last):
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/selenium_mixin.py", line 246, in web_await
    return WebDriverWait(self.webdriver, timeout).until(condition)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/Development/kleinanzeigen-bot/.venv/lib/python3.11/site-packages/selenium/webdriver/support/wait.py", line 95, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 
Stacktrace:
#0 0x562a93ad93d4 <unknown>
#1 0x562a93832207 <unknown>
#2 0x562a9386ec9e <unknown>
#3 0x562a9386ed91 <unknown>
#4 0x562a938a8735 <unknown>
#5 0x562a9388f3bd <unknown>
#6 0x562a938a67b7 <unknown>
#7 0x562a9388f133 <unknown>
#8 0x562a938631bf <unknown>
#9 0x562a93864813 <unknown>
#10 0x562a93aa5913 <unknown>
#11 0x562a93aa9836 <unknown>
#12 0x562a93aa92c8 <unknown>
#13 0x562a93aa9d35 <unknown>
#14 0x562a93ab0e87 <unknown>
#15 0x562a93aaa110 <unknown>
#16 0x562a93a80f05 <unknown>
#17 0x562a93ac4ec7 <unknown>
#18 0x562a93ac5096 <unknown>
#19 0x562a93ad338d <unknown>
#20 0x7faa7407844b <unknown>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/__init__.py", line 491, in publish_ad
    self.web_click(By.XPATH, '//*[contains(@class, "CarrierSelectionModal--Button")]')
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/selenium_mixin.py", line 267, in web_click
    elem = self.web_await(
           ^^^^^^^^^^^^^^^
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/selenium_mixin.py", line 249, in web_await
    raise exception_on_timeout() from ex
selenium.common.exceptions.NoSuchElementException: Message: Element xpath://*[contains(@class, "CarrierSelectionModal--Button")] not found or not clickable; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception

[INFO]  ... pausing for 1706 ms ...
[DEBUG]  ... pausing for 474 ms ...
[ERROR] Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/__main__.py", line 8, in <module>
    kleinanzeigen_bot.main(sys.argv)
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/__init__.py", line 1014, in main
    KleinanzeigenBot().run(args)
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/__init__.py", line 80, in run
    self.publish_ads(ads)
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/__init__.py", line 444, in publish_ads
    self.publish_ad(ad_file, ad_cfg, ad_cfg_orig)
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/__init__.py", line 520, in publish_ad
    self.web_click(By.XPATH, '//*[contains(@class, "BuyNowSection")]//div[contains(@class, "Toggle--Slider")]')
  File "/home/admin/Development/kleinanzeigen-bot/kleinanzeigen_bot/selenium_mixin.py", line 272, in web_click
    elem.click()
  File "/home/admin/Development/kleinanzeigen-bot/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 94, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/home/admin/Development/kleinanzeigen-bot/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webelement.py", line 395, in _execute
    return self._parent.execute(command, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/admin/Development/kleinanzeigen-bot/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 346, in execute
    self.error_handler.check_response(response)
  File "/home/admin/Development/kleinanzeigen-bot/.venv/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <div class="jsx-1581808930 Toggle--Slider"></div> is not clickable at point (212, 520). Other element would receive the click: <div aria-hidden="true" class="jsx-666287395 Modal--backdrop"></div>
  (Session info: chrome=114.0.5735.133)
Stacktrace:
#0 0x562a93ad93d4 <unknown>
#1 0x562a93832207 <unknown>
#2 0x562a93874384 <unknown>
#3 0x562a93872930 <unknown>
#4 0x562a93870ac1 <unknown>
#5 0x562a938700be <unknown>
#6 0x562a938657bf <unknown>
#7 0x562a9388f392 <unknown>
#8 0x562a938651a9 <unknown>
#9 0x562a9388f60e <unknown>
#10 0x562a938a67b7 <unknown>
#11 0x562a9388f133 <unknown>
#12 0x562a938631bf <unknown>
#13 0x562a93864813 <unknown>
#14 0x562a93aa5913 <unknown>
#15 0x562a93aa9836 <unknown>
#16 0x562a93aa92c8 <unknown>
#17 0x562a93aa9d35 <unknown>
#18 0x562a93ab0e87 <unknown>
#19 0x562a93aaa110 <unknown>
#20 0x562a93a80f05 <unknown>
#21 0x562a93ac4ec7 <unknown>
#22 0x562a93ac5096 <unknown>
#23 0x562a93ad338d <unknown>
#24 0x7faa7407844b <unknown>
DreckSoft commented 1 year ago

That seems to happen in more categories. Maybe all that have the new optional condition.