Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
i get an error at this part of my code.
try:
actionChains.double_click(driver.find_element_by_xpath("//div[4]/form/div/div").perform()
except NoSuchElementException:
actionChains.double_click(driver.find_element_by_xpath("//form/div[2]/div").perform()
If I remove the second line of the code (actionChains.double_click(driver.find_element_by_xpath("//div[4]/form/div/div").perform()
), it works. But, if I don't It doesn't. Any help is greatly appreciated!
You should add a closing parenthesis to the call to the double_click method:
try:
actionChains.double_click(driver.find_element_by_xpath("//div[4]/form/div/div")).perform()
except NoSuchElementException:
actionChains.double_click(driver.find_element_by_xpath("//form/div[2]/div")).perform()
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
Kindly look at 10th line of this code snippet:
You forgot to close print():
print(txt.read())
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
File "<ipython-input-193-4fdf3d1abd17>", line 1
ConfusionMatrix(y_data, model.predict(y_data() , label= ["not_subscribed", "subscribed"])
^
SyntaxError: unexpected EOF while parsing
You're missing an extra bracket, observe you have an EOF error. Try this
ConfusionMatrix(y_data, model.predict(y_data() , label= ["not_subscribed", "subscribed"]))
The python compiler is pretty friendly, as you can see where the error arrow is pointing to, most of time :)
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I'm not sure why I'm getting this error.enter image description here
You only need a return statement if you are inside a function. The syntax of a function is the following:
def functionName():
# code goes here
return # you can also specify what to return here or just leave it
# blank, a return statement is not necessary.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I am 100% new to programming and I'm having trouble practising the print hello world statement. My code is as follows:
print(hello world!)
You are missing the '' or "" that need to wrap around any string object in Python
Try:
print('Hello World!')
You may find this documentation useful.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I am getting a syntax error when I use except: even for simple try: a=0 except: statement
try :
a=0
print(a + 2)
except :
And the error is
SyntaxError: invalid syntax
Your code has indentations errors. It should be like:
try:
a = 0
print (a+2)
except:
#do something