Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[letterboxd] selenium.common.exceptions.ElementClickInterceptedException: because another element obscures it #176

Closed
noyse27 opened this issue Nov 25, 2021 · 4 comments
Labels

Comments

@noyse27
Copy link

noyse27 commented Nov 25, 2021

tried several times but always the same result:

noyse@MSI:~/RatS$ sudo python3 transfer_ratings.py --source trakt --destination letterboxd
===== Trakt: Parsing 12 pages with 662 movies in total
100% (662 of 662) |##############################################################| Elapsed Time: 0:32:45 Time:  0:32:45

===== Trakt: saved 662 parsed movies to /home/noyse/RatS/RatS/exports/20211125202703_Trakt.json
===== Letterboxd: performing loginTraceback (most recent call last):
  File "/home/noyse/RatS/transfer_ratings.py", line 271, in <module>
    main()
  File "/home/noyse/RatS/transfer_ratings.py", line 92, in main
    execute(args)
  File "/home/noyse/RatS/transfer_ratings.py", line 170, in execute
    execute_inserting(args, movies, parser)
  File "/home/noyse/RatS/transfer_ratings.py", line 192, in execute_inserting
    inserter = get_inserter_from_arg(destination)(args)
  File "/home/noyse/RatS/RatS/letterboxd/letterboxd_ratings_inserter.py", line 27, in __init__
    super(LetterboxdRatingsInserter, self).__init__(Letterboxd(args), args)
  File "/home/noyse/RatS/RatS/letterboxd/letterboxd_site.py", line 16, in __init__
    super(Letterboxd, self).__init__(args)
  File "/home/noyse/RatS/RatS/base/base_site.py", line 41, in __init__
    self._init_browser()
  File "/home/noyse/RatS/RatS/base/base_site.py", line 82, in _init_browser
    self.login()
  File "/home/noyse/RatS/RatS/base/base_site.py", line 98, in login
    self._click_login_button()
  File "/home/noyse/RatS/RatS/base/base_site.py", line 152, in _click_login_button
    login_button.click()
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webelement.py", line 672, in _execute
    return self._parent.execute(command, params)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 318, in execute
    self.error_handler.check_response(response)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: Element <input class="button -action button-green" type="submit"> is not clickable at point (593,365) because another element <iframe id="zIframe_tyche_trendi_video" class="zeus_iframe" src="//cdn.playwire.com/bolt4/js/zeus/releases/4.3.65/frame/frame.html#id=tyche_trendi_video___pv=1___eu=true___eis=1637870414762"> obscures it

@noyse27 noyse27 changed the title [letterboxed] selenium.common.exceptions.ElementClickInterceptedException: because another element obscures it [letterboxd] selenium.common.exceptions.ElementClickInterceptedException: because another element obscures it Nov 25, 2021
@littlebirdiegr
Copy link

same errors as well when trakt to letterboxd

@noyse27
Copy link
Author

noyse27 commented Dec 2, 2021

it seems to be depending on the waiting time:
when im changing in letterboxd_site.py
from

    def _pre_login_action(self):
        time.sleep(2)

to

    def _pre_login_action(self):
        time.sleep(10)

and in base_site.py
from

  def _click_login_button(self):
       login_button = self.browser.find_element_by_xpath(self.LOGIN_BUTTON_SELECTOR)
       login_button.click()
       time.sleep(2)  # wait for page to load

to

    def _click_login_button(self):
        login_button = self.browser.find_element_by_xpath(self.LOGIN_BUTTON_SELECTOR)
        login_button.click()
        time.sleep(10)  # wait for page to load

it continues the import until the next error occurs

noyse@MSI:~/RatS$ sudo python3 transfer_ratings.py --source trakt --destination letterboxd --file /home/noyse/RatS/RatS/exports/20211125202703_Trakt.json
===== Trakt: performing login
===== loaded 662 movies from /home/noyse/RatS/RatS/exports//home/noyse/RatS/RatS/exports/20211125202703_Trakt.json
===== Letterboxd: posting 662 movies
===== saving movies to CSV

===== Letterboxd: matching the movies...
100% (662 of 662) |##############################################################| Elapsed Time: 0:00:20 Time:  0:00:20

ERROR: There was an exception inside Letterboxd (see below). Skipping insertion.

===== ABORTING =====
Traceback (most recent call last):
  File "/home/noyse/RatS/transfer_ratings.py", line 252, in insert_movie_ratings
    inserter.insert(movies, source)
  File "/home/noyse/RatS/RatS/letterboxd/letterboxd_ratings_inserter.py", line 42, in insert
    self.upload_csv_file(len(movies))
  File "/home/noyse/RatS/RatS/letterboxd/letterboxd_ratings_inserter.py", line 60, in upload_csv_file
    self._wait_for_movie_matching(wait, movies_count)
  File "/home/noyse/RatS/RatS/letterboxd/letterboxd_ratings_inserter.py", line 100, in _wait_for_movie_matching
    self.site.browser.find_element_by_xpath(enabled_import_button_selector).click()
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webelement.py", line 672, in _execute
    return self._parent.execute(command, params)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 318, in execute
    self.error_handler.check_response(response)
  File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="button -action button-large button-action save-users-imported-imdb-history submit-matched-films add-import-films-to-list track-event" href="#"> is not clickable at point (529,509) because another element <iframe id="zIframe_tyche_trendi_video" class="zeus_iframe" src="//cdn.playwire.com/bolt4/js/zeus/releases/4.3.66/frame/frame.html#id=tyche_trendi_video___pv=4___eu=true___eis=1638483171411"> obscures it

but i do not know where i have to improve the waiting time so the import goes further

@noyse27
Copy link
Author

noyse27 commented Dec 6, 2021

tried it on my vserver- same error there

@StegSchreck
Copy link
Owner

becomes obsolete by #306

@StegSchreck StegSchreck closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
@github-project-automation github-project-automation bot moved this to Done in RatS Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants