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

instadm.py err: index out of range #2

Open
SkyLakeRT opened this issue Jul 9, 2020 · 10 comments
Open

instadm.py err: index out of range #2

SkyLakeRT opened this issue Jul 9, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@SkyLakeRT
Copy link

SkyLakeRT commented Jul 9, 2020

Hi, everyone!

I have this error
ERROR:root:list index out of range

i use this DM bot with INSTAPY

MY START SCRIPT:

from instadm import InstaDM

if __name__ == '__main__':
	# Auto login
	insta = InstaDM(
		username='my_login',
		password='my_passwd',
		headless=False,
		instapy_workspace='/home/skylakert/'
	)


	#insta.login
@SkyLakeRT
Copy link
Author

I have instapy version Version: 0.6.9

@SkyLakeRT
Copy link
Author

SkyLakeRT commented Jul 9, 2020

i have error before, i change

one - sqlite request [invalid syntax]
two - var - CONN [var CONN is not difined]

1 + 2:
after /if self.instapy_workspace != None:/
#i change to

self.cursor = self.conn.cursor()
cursor = self.conn.execute("SELECT count(*) FROM sqlite_master WHERE type='table' AND name='message';")
self.conn.execute("CREATE TABLE 'message' ('username' TEXT NOT NULL UNIQUE, 'message' TEXT DEFAULT NULL, 'sent_message_at' TIMESTAMP);")

@SkyLakeRT
Copy link
Author

I am check this code,
have error this string
after /def login(self, username, password):/
self.driver.find_elements_by_css_selector(self.selectors['home_to_login_button'])[0].click()

but i don't know how to solved this issue. Help me please!

@SkyLakeRT
Copy link
Author

i have this err from atom editor + debugger
image
image

@SkyLakeRT
Copy link
Author

////////////////////////////////////
OR RUN THIS
//////////////////////////////////////

RUN WITHOUT INSTAPY
ONLY THIS REPO

skylakert@nupc:~/Desktop/developing/atom/IG_SYSTEM/instapy/instapy-quickstart$ python3.7 test_DM-external.py 
__init__
login
__randomSleep__
ERROR:root:list index out of range
sendMessage
Traceback (most recent call last):
  File "test_DM-external.py", line 11, in <module>
    insta.sendMessage(user='xford.tech', message='jast for testingggggggg')
  File "/home/skylakert/Desktop/developing/atom/IG_SYSTEM/instapy/instapy-quickstart/instadm.py", line 89, in sendMessage
    self.driver.find_element_by_name(self.selectors['search_user']).send_keys(user)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 496, in find_element_by_name
    return self.find_element(by=By.NAME, value=name)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
    'value': value})['value']
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="queryBox"]"}
  (Session info: chrome=83.0.4103.116)

@SkyLakeRT
Copy link
Author

init
login
randomSleep
this print() function, i have added this manually

@edohub
Copy link

edohub commented Jul 12, 2020

I've got the same problem, but I couldn't understand from your posts if you figured out how to solve that or not. I do not understand why the list index seems to be out of range, I do not see any problem with lists apparently

@SkyLakeRT
Copy link
Author

I've got the same problem, but I couldn't understand from your posts if you figured out how to solve that or not. I do not understand why the list index seems to be out of range, I do not see any problem with lists apparently

No, I search different bot, only direct message function
https://github.com/b31ngD3v/instagram-auto-dm

@secretshardul
Copy link

Same issue. The issue seems to be with queryBox selector, I can't find it the instagram website.

Unable to locate element: {"method":"css selector","selector":"[name="queryBox"]"}

@CamTosh CamTosh added the bug Something isn't working label Oct 28, 2020
@coding-ty
Copy link

It looks as if your webdriver is version 83.X.X.X. Check your chrome to see if the versions match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants