f_lineno not an attribute on traceback
stuaxo opened this issue · 0 comments
stuaxo commented
I'm not sure exactly where this issue comes from, but I see it with better_tracebacks enabled, and not, without it.
I'm not sure if it's in better exceptions, celery or python 3.8
...
[2022-06-16 16:22:50,321: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/better_exceptions/formatter.py", line 209, in get_traceback_information
frame_info = inspect.getframeinfo(tb)
[2022-06-16 16:22:50,321: WARNING/MainProcess] File "/usr/local/lib/python3.8/inspect.py", line 1469, in getframeinfo
lineno = frame.f_lineno
[2022-06-16 16:22:50,321: WARNING/MainProcess] AttributeError: 'Traceback' object has no attribute 'f_lineno'
[2022-06-16 16:22:50,321: WARNING/MainProcess] Call stack:
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/bin/celery", line 8, in <module>
sys.exit(main())
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/__main__.py", line 15, in main
sys.exit(_main())
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/bin/celery.py", line 217, in main
return celery(auto_envvar_prefix="CELERY")
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/bin/base.py", line 134, in caller
return f(ctx, *args, **kwargs)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/bin/worker.py", line 351, in worker
worker.start()
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/worker.py", line 203, in start
self.blueprint.start(self)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
[2022-06-16 16:22:50,326: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/bootsteps.py", line 365, in start
return self.obj.start()
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/consumer/consumer.py", line 332, in start
blueprint.start(self)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/bootsteps.py", line 116, in start
step.start(parent)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/consumer/consumer.py", line 628, in start
c.loop(*c.loop_args())
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/loops.py", line 97, in asynloop
next(loop)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/asynchronous/hub.py", line 362, in create_loop
cb(*cbargs)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/transport/redis.py", line 1326, in on_readable
self.cycle.on_readable(fileno)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/transport/redis.py", line 562, in on_readable
chan.handlers[type]()
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/transport/redis.py", line 967, in _brpop_read
self.connection._deliver(loads(bytes_to_str(item)), dest)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/transport/virtual/base.py", line 991, in _deliver
callback(message)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/transport/virtual/base.py", line 624, in _callback
return callback(message)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/kombu/messaging.py", line 626, in _receive_callback
return on_m(message) if on_m else self.receive(decoded, message)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/consumer/consumer.py", line 596, in on_task_received
strategy(
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/strategy.py", line 207, in task_message_handler
handle(req)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/worker.py", line 226, in _process_task
req.execute_using_pool(self.pool)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/worker/request.py", line 707, in execute_using_pool
result = apply_async(
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/concurrency/base.py", line 152, in apply_async
return self.on_apply(target, args, kwargs,
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/concurrency/base.py", line 29, in apply_target
ret = target(*args, **kwargs)
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/app/trace.py", line 649, in fast_trace_task
R, I, T, Rstr = tasks[task].__trace__(
[2022-06-16 16:22:50,327: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/app/trace.py", line 468, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
[2022-06-16 16:22:50,328: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/app/trace.py", line 379, in on_error
R = I.handle_error_state(
[2022-06-16 16:22:50,328: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/app/trace.py", line 178, in handle_error_state
return {
[2022-06-16 16:22:50,328: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/app/trace.py", line 237, in handle_failure
self._log_error(task, req, einfo)
[2022-06-16 16:22:50,328: WARNING/MainProcess] File "/home/stu/.virtualenvs/dit-tamato/lib/python3.8/site-packages/celery/app/trace.py", line 265, in _log_error
logger.log(policy.severity, policy.format.strip(), context,
...