traceback Questions
1
I want to access the traceback of a python programm running in a subprocess.
The documentation says:
Exceptions raised in the child process, before the new program has started to execute, will ...
Persephone asked 18/7, 2016 at 10:1
3
How can I get the line number of a traceback programmatically when the code is exec() from a string?
I have a function which is stored in a string, which looks something like this:
func_str = "def <func_name> ..."
I am evaluating it using "exec" and using it on an input as follows:
exec ...
2
Solved
Currently writing a function for a program and one component is to search whether a single variables are being used within a python file.
FUNCTION:
def SINGLE_CHAR_VAR(python_filename):
file = ...
1
Solved
I am running a middle sized django project, whenever a error occurs a traceback is printed, but many functions where Django modules.
But the actual culprit in my own project code, it has only one ...
Criticaster asked 10/12, 2015 at 1:39
3
Solved
I write a lot of Python code that uses external libraries. Frequently I will write a bug, and when I run the code I get a big long traceback in the Python console. 99.999999% of the time it's due t...
4
Solved
If I understand this correctly, Lua by default will call the debug library "debug.traceback" when an error occurs.
However, when embedding Lua into C code like done in the example here:
Simple Lua...
Anderton asked 4/9, 2012 at 3:33
1
Solved
I encountered Error: 'module' object has no attribute 'copy' while running a pygame program. In my code, I never referred to a copy attribute, so I don't understand where the error is coming from.
...
Ganges asked 2/5, 2014 at 0:33
1
Solved
When trying to import glib in python 3 using from gi.repository import glib, I get an error saying:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 2135, in _f...
Deepfry asked 1/7, 2015 at 2:48
8
Solved
In reading about virtualenv here I realized I didn't have pip 1.3+, so I ran pip install --upgrade pip and now when I run pip --version i get the following:
Traceback (most recent call last):
Fil...
Purine asked 20/3, 2013 at 1:45
1
Solved
Python 3.3 includes a module named faulthandler that displays helpful traceback information if a segfault occurs. (For Python versions prior to 3.3, the module can be obtained from PyPI.)
The modu...
Ribose asked 12/2, 2014 at 16:34
1
Solved
Basic problem
It appears that SyntaxErrors (and TypeErrors) raised by the compile() function are not included in the stack trace returned by sys.exc_info(), but are printed as part of the formatte...
1
Solved
I am in the middle of refactoring a huge py module to packages - to not break existing code I moved its contents to package/__init__.py module (Adding code to __init__.py) and went on splitting it ...
Brokenhearted asked 28/11, 2014 at 17:34
1
In my current model User, I have a field "name" which cannot be null.
I try creating a user object, and adding it to the DBSession provided by Pyramid and submitting it with transaction, like so.
...
Burschenschaft asked 20/8, 2013 at 21:33
1
Solved
I have a code which, at some point shows a warning, I think that it is having a problem calculating a mean()
I would like to know if there is any way to force python to tell me where, or which lin...
1
Is it possible to create a custom traceback in Python? I'm trying to write a function raise_from() that imitates Python 3's raise ... from ....
def raise_from(exc, cause):
""" Raises the Exceptio...
Endpaper asked 8/6, 2014 at 17:12
2
Solved
Under what situations would I want to use one over the other?
What is the difference between:
>>> import inspect
>>> print(inspect.getouterframes(inspect.currentframe()))
[(<...
1
Solved
Consider the following code and traceback:
>>> try:
... raise KeyboardInterrupt
... except KeyboardInterrupt:
... raise Exception
...
Traceback (most recent call last):
File "<stdin&...
Lyle asked 19/12, 2013 at 9:34
2
Solved
I have a function which catches all exceptions, and I want to be able to get the traceback as a string within this function.
So far this is not working:
def handle_errors(error_type, error_messa...
Dialectology asked 27/11, 2013 at 11:39
1
Solved
I'm confused about why, when an error is raised in a function within a module I've written, IPython doesn't show me a full traceback with the line in the function that caused the error.
Note: I'm ...
3
Solved
I'm writing a test runner. I have an object that can catch and store exceptions, which will be formatted as a string later as part of the test failure report. I'm trying to unit-test the procedure ...
Arv asked 8/10, 2013 at 13:17
2
Solved
I have problem with understanding how to work with ebean transactions under play 2.1.1.
Ebean.execute(txScope, new TxRunnable() {
public void run() {
Ebean.beginTransaction();
System.out.pri...
Skep asked 12/6, 2013 at 21:56
5
Solved
When an exception occurs in Python, can you inspect the stack? Can you determine its depth? I've looked at the traceback module, but I can't figure out how to use it.
My goal is to catch any excep...
Youngman asked 1/3, 2010 at 21:37
5
Solved
I need to get some debugging libraries/tools to trace back the stack information print out to the stdout.
Python's traceback library can be an example.
What can be the C++ equivalent to Python'...
1
Solved
This nice little Python decorator can configurably disabled decorated functions:
enabled = get_bool_from_config()
def run_if_enabled(fn):
def wrapped(*args, **kwargs):
try:
return fn(*args, **...
1
Solved
I have added an assert(0) in a function to understand the sequence of function calls to this function.
Ex:
def my_func():
...lines of code...
assert(0)
...more lines of code...
The logs show...
Endemic asked 16/12, 2012 at 17:32
© 2022 - 2024 — McMap. All rights reserved.