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

KeyError: 'dissmiss_save_information' #84

Open
KalianBogan opened this issue Nov 7, 2020 · 2 comments
Open

KeyError: 'dissmiss_save_information' #84

KalianBogan opened this issue Nov 7, 2020 · 2 comments

Comments

@KalianBogan
Copy link

KalianBogan commented Nov 7, 2020

Hi
When trying to run instapy with simple settings, the same error always occurs. At the same time, the login from instapy is visible in the login history in the settigns of the instagram account. Can you help me or tell me what I'm doing wrong, please


#docker_quickstart.py
from instapy import InstaPy
from instapy.util import smart_run

insta_username = 'LOG'
insta_password = 'PASS'

bot = InstaPy(username=insta_username, password=insta_password, headless_browser=True)
with smart_run(bot):
session.set_user_interact(amount=3, randomize=True, percentage=100)
session.like_by_tags(['cat'], amount=1, interact=True)
bot.end()

logs from docker-compose up

Starting instapy_web ... done
Attaching to instapy_web
2588kb [00:21, 122.37kb/s]
web_1 | INFO [2020-11-07 20:40:22] [LOG] Session started!
web_1 | INFO [2020-11-07 20:40:22] [LOG] -- Connection Checklist [1/2] (Internet Connection Status)
web_1 | INFO [2020-11-07 20:40:22] [LOG] - Internet Connection Status: ok
web_1 | INFO [2020-11-07 20:40:22] [LOG] - Current IP is "..." and it's from "Ukraine/UA"
web_1 | INFO [2020-11-07 20:40:22] [LOG] -- Connection Checklist [2/2] (Hide Selenium Extension)
web_1 | INFO [2020-11-07 20:40:22] [LOG] - window.navigator.webdriver response: None
web_1 | INFO [2020-11-07 20:40:22] [LOG] - Hide Selenium Extension: ok
web_1 | INFO [2020-11-07 20:40:42] [LOG] Sessional Live Report:
web_1 | |> No any statistics to show
web_1 |
web_1 |
web_1 | [Session lasted 46.3 seconds]
web_1 | INFO [2020-11-07 20:40:42] [LOG] Session ended!
web_1 | InstaPy Version: 0.6.12
web_1 | .. .. .. .. .. .. ._.
web_1 | Workspace in use: "/code/InstaPy"
web_1 | OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
web_1 | oooooooooooooooooooooooooooooooooooooooooooooooooooooo
web_1 | Cookie file not found, creating cookie...
web_1 |
web_1 | OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
web_1 | ooooooooooooooooooooooooooooooooooooooooooooooooooo
web_1 |
web_1 |
web_1 |
web_1 | Traceback (most recent call last):
web_1 | File "docker_quickstart.py", line 19, in
web_1 | with smart_run(bot):
web_1 | File "/usr/local/lib/python3.7/contextlib.py", line 112, in enter
web_1 | return next(self.gen)
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/util.py", line 1920, in smart_run
web_1 | session.login()
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 433, in login
web_1 | self.want_check_browser,
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/login_util.py", line 364, in login_user
web_1 | dissmiss_save_information(browser, logger)
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/login_util.py", line 495, in dissmiss_save_information
web_1 | offer_elem_loc = read_xpath(dissmiss_save_information.name, "offer_elem_loc")
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/xpath.py", line 5, in read_xpath
web_1 | return xpath[function_name][xpath_name]
web_1 | KeyError: 'dissmiss_save_information'
instapy_web exited with code 1

@KalianBogan
Copy link
Author

KalianBogan commented Nov 16, 2020

tmp solution:
in docker container (from image on version 0.6.12) change /usr/local/lib/python3.7/site-packages/instapy/xpath_compile.py line 38
from "xpath["dismiss_save_information"] = {" to "xpath["dissmiss_save_information"] = {"

@elulcao
Copy link
Contributor

elulcao commented Nov 18, 2020

WA:
Use a copy of login_util.py from InstaPy (latest) and then map to the Docker container before running it:
ie:
-v $(pwd)/login_util.py:/usr/local/lib/python3.7/site-packages/instapy/login_util.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants