StegSchreck / RatS

Movie Ratings Synchronization with Python
GNU Affero General Public License v3.0
272 stars 31 forks source link

error transfer from trakt to imdb #34

Closed sonpaks closed 6 years ago

sonpaks commented 6 years ago

hello, i can't get the script to work. i already reinstall everything, no luck. this is the error message :

===== Trakt: saved 558 parsed movies to /home/rudiecantfail/RatS/RatS/exports/20171129050104_Trakt.json ===== IMDB: posting 558 movies ===== IMDB: posted The Other End of the Line (2008) Traceback (most recent call last): File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 104, in _post_movie_rating self._click_rating(my_rating) File "/home/rudiecantfail/RatS/RatS/imdb/imdb_ratings_inserter.py", line 45, in _click_rating stars[star_index].click() File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute return self._parent.execute(command, params) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/rudiecantfail/RatS/transfer_ratings.py", line 149, in main() File "/home/rudiecantfail/RatS/transfer_ratings.py", line 65, in main execute(args) File "/home/rudiecantfail/RatS/transfer_ratings.py", line 124, in execute insert_movie_ratings(inserter, movies, type(parser.site).name) File "/home/rudiecantfail/RatS/transfer_ratings.py", line 145, in insert_movie_ratings inserter.insert(movies, source) File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 35, in insert self._post_movie_rating(movie[source.lower()]['my_rating']) File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 107, in _post_movie_rating self._click_rating(my_rating) File "/home/rudiecantfail/RatS/RatS/imdb/imdb_ratings_inserter.py", line 45, in _click_rating stars[star_index].click() File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webelement.py", line 501, in _execute return self._parent.execute(command, params) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message:

StegSchreck commented 6 years ago

Thanks for reporting this issue. I will have a look into this soon.

StegSchreck commented 6 years ago

I could reproduce the issue. Not quite sure about how to fix it yet though. Will keep investigating.

StegSchreck commented 6 years ago

@sonpaks, This issue should be fixed now. Please try again.

sonpaks commented 6 years ago

hi StegSchrek, got different error here's the error

[rudiecantfail@thin]:(2.1Mb)~$ python3 ~/RatS/transfer_ratings.py --source trakt --destination imdb -v --file 20171203184302_Trakt.json ===== Trakt: performing login ===== loaded 558 movies from /home/rudiecantfail/RatS/RatS/exports/20171203184302_Trakt.json ===== IMDB: posting 558 movies
===== IMDB: posted The Other End of the Line (2008) ===== IMDB: posted Crooked House (2017) ===== IMDB: posted The Hitman's Bodyguard (2017) ===== IMDB: posted Atomic Blonde (2017) ===== IMDB: posted Site Unseen: An Emma Fielding Mystery (2017) ===== IMDB: posted Assassination of a High School President (2008) ===== IMDB: posted Gracie (2007) ===== IMDB: posted Jersey Girl (2004) Traceback (most recent call last): File "/home/rudiecantfail/RatS/transfer_ratings.py", line 149, in main() File "/home/rudiecantfail/RatS/transfer_ratings.py", line 65, in main execute(args) File "/home/rudiecantfail/RatS/transfer_ratings.py", line 124, in execute insert_movie_ratings(inserter, movies, type(parser.site).name) File "/home/rudiecantfail/RatS/transfer_ratings.py", line 145, in insert_movie_ratings inserter.insert(movies, source) File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 35, in insert self._post_movie_rating(movie[source.lower()]['my_rating']) File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 104, in _post_movie_rating self._click_rating(my_rating) File "/home/rudiecantfail/RatS/RatS/imdb/imdb_ratings_inserter.py", line 48, in _click_rating .move_to_element(stars[star_index]).click(stars[star_index])\ File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/action_chains.py", line 80, in perform self.w3c_actions.perform() File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/actions/action_builder.py", line 76, in perform self.driver.execute(Command.W3C_ACTIONS, enc) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: (620.5, 722) is out of bounds of viewport width (720) and height (536)

i've try several time, and it always stuck after "IMDB: posted Jersey Girl (2004)"

--edit

i goit success transfer from trakt to letterboxd, and then i try to transfer from letterboxd to imdb, i got the exact same error

===== Letterboxd: The file with 558 movies was uploaded and successfully processed by the servers. You may check your Letterboxd account later. [rudiecantfail@thin]:(251.8kb)~/RatS/RatS$ python3 ~/RatS/transfer_ratings.py --source letterboxd --destination imdb -v ===== Letterboxd: CSV downloaded to /home/rudiecantfail/RatS/RatS/exports/20171204050630_Letterboxd.csv ===== getting movies from CSV

===== Letterboxd: saved 555 parsed movies to /home/rudiecantfail/RatS/RatS/exports/20171204050630_Letterboxd.json ===== IMDB: posting 555 movies
===== IMDB: posted The Other End of the Line (2008) ===== IMDB: posted Crooked House (2017) ===== IMDB: posted The Hitman's Bodyguard (2017) ===== IMDB: posted Atomic Blonde (2017) ===== IMDB: posted Site Unseen: An Emma Fielding Mystery (2017) ===== IMDB: posted Assassination of a High School President (2008) ===== IMDB: posted Gracie (2007) ===== IMDB: posted Jersey Girl (2004) Traceback (most recent call last): File "/home/rudiecantfail/RatS/transfer_ratings.py", line 149, in main() File "/home/rudiecantfail/RatS/transfer_ratings.py", line 65, in main execute(args) File "/home/rudiecantfail/RatS/transfer_ratings.py", line 124, in execute insert_movie_ratings(inserter, movies, type(parser.site).name) File "/home/rudiecantfail/RatS/transfer_ratings.py", line 145, in insert_movie_ratings inserter.insert(movies, source) File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 35, in insert self._post_movie_rating(movie[source.lower()]['my_rating']) File "/home/rudiecantfail/RatS/RatS/base/base_ratings_inserter.py", line 104, in _post_movie_rating self._click_rating(my_rating) File "/home/rudiecantfail/RatS/RatS/imdb/imdb_ratings_inserter.py", line 48, in _click_rating .move_to_element(stars[star_index]).click(stars[star_index])\ File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/action_chains.py", line 80, in perform self.w3c_actions.perform() File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/actions/action_builder.py", line 76, in perform self.driver.execute(Command.W3C_ACTIONS, enc) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: (620.5, 722) is out of bounds of viewport width (720) and height (536)

sonpaks commented 6 years ago

update i finally success transfer from trakt to imdb, ===== IMDB: sucessfully posted 555 of 558 movies FAILED TO FIND: Manchester United - The Champions League Final and The Road To Moscow 2008 (2008) FAILED TO FIND: NOFX - Ten Years of Fuckin' Up (1994) FAILED TO FIND: The Beatles- Live at the Washington Coliseum, 1964 (2010) ===== IMDB: export data for 3 failed movies to /home/rudiecantfail/RatS/RatS/exports/20171204132724_IMDB_failed.json

i use different pc. the failed one, i'm using Ubuntu 16.04.3 LTS - Mozilla Firefox 57.0.1 on a vps the success one, i'm using Ubuntu 17.10 - Mozilla Firefox 57.0.1 on my desktop pc

thank you...

StegSchreck commented 6 years ago

Hey, about the error with the viewport you mentioned in your comment before, I think this is due to the changed implementation of the IMDB inserter. I had to use mouse control commands, as the normal selenium way of clicking the rating wasn't working in a stable way (which is the fix for your original error). I assume, that the display size plays an important role in this. I guess the display is just a little bit too small, so that the Element for the ratings on the page is not in the "visible" area. Id this is an issue for you, I would try to investigate further on this. Or are you satisfied with the script working on your desktop pc?

sonpaks commented 6 years ago

oh it's okay, i'm satisfied it's working on my pc. i use vps cause i have slow internet connection. once again thank you.

StegSchreck commented 6 years ago

Glad, that I could help you :) If you have any more issues or improvement suggestions, feel free to contact me again.

Have fun.