InstaPy / InstaPy/instapy-docker
RuntimeError: generator didn't yield
- Lingua principale
- Python
- Stelle
- 193
- Fork
- 84
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi we are trying to run instapy in docker with following command:
docker run --name instapy -v /Users/jurgenceramique/InstaPy/zwei.py:/code/docker_quickstart.py -v /Users/jurgenceramique/InstaWork:/code/InstaPy -d instapy/instapy:latest
zwei.py has following entries
# imports
from instapy import InstaPy
from instapy import smart_run
# login credentials
insta_username = '****'
insta_password = '******'
# get an InstaPy bot!
# set headless_browser=True to run InstaPy in the background
bot = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True)
with smart_run(bot):
""" Activity flow """
# general settings
bot.set_relationship_bounds(enabled=True,
delimit_by_numbers=True,
max_followers=4590,
min_followers=40,
min_following=100)
bot.set_dont_include(["friend1", "friend2", "friend3"])
bot.set_dont_like(["pizza", "#store"])
# activities
""" Massive Follow of users followers (I suggest to follow not less than
3500/4000 users for better results)...
"""
bot.follow_user_followers(['helge_schneider_official', 'chailatte_roche', 'evimstore'], amount=4,
randomize=False, interact=False)
""" First step of Unfollow action - Unfollow not follower users...
"""
#bot.unfollow_users(amount=100, InstapyFollowed=(True, "nonfollowers"),
# style="FIFO",
# unfollow_after=1 * 60 * 60, sleep_delay=601)
we get following output from docker logs
2445kb [00:03, 698.04kb/s] ******
INFO [2020-10-22 19:22:55] [******] Session started!
INFO [2020-10-22 19:22:55] [******] -- Connection Checklist [1/2] (Internet Connection Status)
INFO [2020-10-22 19:22:55] [******] - Internet Connection Status: ok
INFO [2020-10-22 19:22:55] [******] - Current IP is "92.75.213.99" and it's from "Germany/DE"
INFO [2020-10-22 19:22:55] [******] -- Connection Checklist [2/2] (Hide Selenium Extension)
INFO [2020-10-22 19:22:55] [******] - window.navigator.webdriver response: None
INFO [2020-10-22 19:22:55] [******] - Hide Selenium Extension: ok
INFO [2020-10-22 19:23:39] [******] Timed out with failure while explicitly waiting until title contains 'Login' string!
INFO [2020-10-22 19:24:17] [******] Timed out with failure while explicitly waiting until visibility of element located!
INFO [2020-10-22 19:24:23] [******] Sessional Live Report:
|> No any statistics to show
[Session lasted 1.63 minutes]
INFO [2020-10-22 19:24:23] [******] Session ended!
InstaPy Version: 0.6.11
._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/root/InstaPy"
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
Cookie file not found, creating cookie...
**********************************************************************
If raising an issue, please also upload the file located at:
/tmp/20201022-192422.html
**********************************************************************
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Traceback (most recent call last):
File "docker_quickstart.py", line 32, in
with smart_run(bot):
File "/usr/local/lib/python3.7/contextlib.py", line 114, in __enter__
raise RuntimeError("generator didn't yield") from None
RuntimeError: generator didn't yield
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing the Docker command with docker_quickstart.py and inspect the smart_run context manager after the login and element-wait timeouts. Use the traceback and generated /tmp/20201022-192422.html to trace why the context manager exits without yielding. Done means the documented container command completes without RuntimeError and the session starts successfully.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, python
- Ambito
- devops
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100