-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
I run this in a new notebook:
try:
raise ValueError
except Exception as e:
passand I get this error:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/var/folders/w8/wx98k7w1093497fd8l72lwdnj3ln52/T/tmp77h_1vwmlinea_ipython/658d4341-37c6-4ddf-812a-61dd669cd2dd_3.py in <module>
1 try:
----> 2 raise ValueError
3 except Exception as e:
ValueError:
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
/var/folders/w8/wx98k7w1093497fd8l72lwdnj3ln52/T/tmp77h_1vwmlinea_ipython/658d4341-37c6-4ddf-812a-61dd669cd2dd_3.py in <module>
----> 1 try:
2 raise ValueError
3 except Exception as e:
4 pass
~/opt/anaconda3/lib/python3.8/site-packages/lineapy/utils/lineabuiltins.py in l_exec_statement(code)
162 path = "<unknown>"
163 bytecode = compile(code, path, "exec")
--> 164 trace_fn = exec_and_record_function_calls(
165 bytecode, context.global_variables
166 )
~/opt/anaconda3/lib/python3.8/site-packages/lineapy/system_tracing/exec_and_record_function_calls.py in exec_and_record_function_calls(code, globals_)
27 try:
28 settrace(trace_func)
---> 29 exec(code, globals_)
30 # Always stop tracing even if exception raised
31 finally:
/var/folders/w8/wx98k7w1093497fd8l72lwdnj3ln52/T/tmp77h_1vwmlinea_ipython/658d4341-37c6-4ddf-812a-61dd669cd2dd_3.py in <module>
1 try:
2 raise ValueError
----> 3 except Exception as e:
4 pass
/var/folders/w8/wx98k7w1093497fd8l72lwdnj3ln52/T/tmp77h_1vwmlinea_ipython/658d4341-37c6-4ddf-812a-61dd669cd2dd_3.py in <module>
1 try:
2 raise ValueError
----> 3 except Exception as e:
4 pass
~/opt/anaconda3/lib/python3.8/site-packages/lineapy/system_tracing/_trace_func.py in __call__(self, frame, event, arg)
103 if code in self.code_to_return_value_callback:
104 return_value_callback = self.code_to_return_value_callback[code]
--> 105 function_call = return_value_callback(op_stack, frame.f_lasti)
106 if isinstance(function_call, FunctionCall):
107 self.function_calls.append(function_call)
~/opt/anaconda3/lib/python3.8/site-packages/lineapy/system_tracing/_trace_func.py in <lambda>(post_stack, _)
649 args.reverse()
650 return lambda post_stack, _: FunctionCall(
--> 651 COMPARE_OPS[value], args, res=post_stack[-1]
652 )
653
KeyError: 'exception match'am on version 0.1.4
最初由 @antingshen 在 LineaLabs/lineapy#712 发布
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels