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 27 days ago.
Improve this question
this code is running fine on my device but its given error in my clients's device
i Am a beginner
for i in hashes:
wai = 1
while wai==1:
hsh=unhasherfull(i)
#print(hsh)
unhashedhashes=hashdec(hsh,proxym=None)
if unhashedhashes == "wait":
time.sleep(11)
continue
elif unhashedhashes == None:
continue
#print(unhashedhashes)
if unhashedhashes != None or unhashedhashes != "wait" or unhashedhashes != "Captcha Check" or unhashedhashes != " " or unhashedhashes != "":
wai=0
break
print("--------------------")
with open("results1.txt","a") as f:
f.write(f"{unhashedhashes}\n")
ERROR :
--------------------
Traceback (most recent call last):
File "c:\Users\Roberto\Downloads\final hashesh.com hash decryptor with capsolve (1)\final hashesh.com hash decryptor with capsolve\mainvari.py", line 193, in <module>
f.write(unhashedhashes+"\n")
i tried everything from chagning python version and changing little bit of code
i expected to run it like it runs on my pc
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 4 years ago.
Improve this question
I am trying to work out the length of a string in python however I can't seem to get a correct response. If someone could tell me what I am doing wrong, I would be very grateful.
Code:
name = input("Type a string!")
name = name.upper
lenname = len(name)
if lenname == 3:
print("Success")
else:
print("Fail")
I expect the output to be Success when I enter abc however I receive:
TypeError Traceback (most recent
call last)
<ipython-input-20-1de45569cf05> in <module>
1 name = input("Type a string!")
2 name = name.upper
----> 3 lenname = len(name)
4 if lenname == 3:
5 print("Sucess")
TypeError: object of type 'builtin_function_or_method' has no len()
You're trying to access upper like it's a field, not a method. On the line above where you use len, do name = name.upper().
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 6 years ago.
Improve this question
My else and else if statements are not working. Every time it is showing incorrect syntax, whether I run it in shell or in file.
>>> num = 6
>>> if num == 4:
print("no is 4")
else:
SyntaxError: invalid syntax
Your indentation is bad :
if num == 4:
print("num is 4")
else:
print("num is not 4")
The following code will print True to the console.
num = 6
if num is 6:
print(True);
else:
print(False);
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 8 years ago.
Improve this question
I'm new to python so this may be a beginner question. My 'else' statement in the code below gets a syntax error for a reason beyond my mind. I've looked up the syntax for it multiple times but I cannot find the error. This is my python code:
siteswap = input("Enter the siteswap you want to validate here:")
aantal_digits = len(siteswap)
i = 0
j = 1
while i != aantal_digits:
if (int(siteswap[i])+ (i + 1)) % aantal_digits == (int(siteswap[1:aantal_digits])+ (j + 1)) % aantal_digits:
print("This siteswap is invalid")
break
elif i != aantal_digits:
del (int(siteswap[i])
else:
print ("This siteswap is valid")
break
The else is highlighted and I get a "syntax error".
Your problem is
del (int(siteswap[i])
You are missing a closing parenthesis (but the parenthesis are unnecessary in the first place). Also, del int(siteswap[i]) will not work, because you cannot delete function calls: SyntaxError: can't delete function call
del siteswap[i]
will delete the actual item from your array.
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 8 years ago.
Improve this question
I've got this piece of code that is a part of a student database I'm making for class and I really can't determine why I'm getting invalid syntax on a particular line (line 3, userints).
def userints():
choices = int(input("Choose Student ID 1-6:")
userints = int(choices)
print (userints)
if userints == 1:
for line_number, line in enumerate(fileinput.input('init2.txt', inplace=1)):
if line_number == 1:
continue
else:
sys.stdout.write(line)
You forgot about second brace.
You forgot a ) on the previous line. It should be:
choices = int(input("Choose Student ID 1-6:"))
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 7 years ago.
Improve this question
I am performing one python program and the part of the code is as follows
while 1:
data = conn.recv(BUFFER_SIZE)
if not data: break
print "received data:", data
com = "echo " + data
print com
conn.send(data)
conn.close()
but when i am trying to execute the code i am getting the following error.
File "server.py", line 17
com = "echo " + data
^
IndentationError: unexpected indent
I am not getting whats wrong with the code above.
check that you either consistently have tabs or spaces not a mix of both.