python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Why am I getting a "Name error" for a variable that was defined beforehand?
Not sure why I am getting a name error for variable c15k when c15k is defined beforehand. I have tried putting the entire code in a "try except" statement without success. The goal is to run...
hector.h2913
Votes: 0
Answers: 1
When would I use 'else' and 'finally' in a try-except statement in python?
My question is where the difference between
try:
print("Hello")
except:
print("Something went wrong")
else:
print("Nothing went wrong")
and
try:
print("Hell...
Philipp Kut
Votes: 0
Answers: 3
HTTPError when appending DataFrame
I am reading Python code from another programmer, particularly the following code block:
try:
df.append(df_extension)
except HTTPError as e:
if ("No data could be loaded!" in str(e))...
NerdOnTour
Votes: 0
Answers: 1
concurrent.futures does not throw exception when using try except
When using concurrent.futures.ThreadPoolExecutor() it doesn't throw an exception for try except.
For eg:
num = [1,2,3,4,5]
def div():
for i in num:
return i/0
print('Done')
try:
d...
Samsun
Votes: 0
Answers: 1