Python Forum
Enabling tracebacks in Voila programatically
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enabling tracebacks in Voila programatically
#1
Question 
I have some code in a Jupyter notebook. When I run it locally. It works as expected. If I use Voila to render the notebook locally it still works. When I deploy my code to a Docker container it fails on a specific cell. The error message only tells me which cell has the error. Without the actual error message it is very difficult to identify what is causing the error.

The error is pretty generic:
Quote:There was an error when executing cell [3]. Please run VoilĂ  with --show_tracebacks=True or --debug to see the error message, or configure VoilaConfiguration.show_tracebacks.

Unfortunately, I do not have access to the Voila configuration, so I can't use either of the options shown in the error message to enable tracebacks. We also do not want to enable tracebacks for every notebook. We only want to see tracebacks in this notebook.

Is it possible to enable tracebacks using some code I can include in my notebook, or by adding a file to my notebooks directory?
Reply
#2
Looking at the git repo it looks like debug and show_tracebacks affect what gets logged. Are you seeing the error message in the log? Can you look at the log?
Reply
#3
(Jun-11-2025, 05:40 PM)deanhystad Wrote: Looking at the git repo it looks like debug and show_tracebacks affect what gets logged. Are you seeing the error message in the log? Can you look at the log?
Unfortunately I don't have access to the logs.

I was able to find my issue by taking the problem cell and moving each line of code into its own cell. Now I know where the error is occurring based on the cell number.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Enabling interrupt on Adafruits button/led board Moris526 0 3,064 Apr-30-2021, 03:29 PM
Last Post: Moris526
  Enabling I2C on Raspberry Pi DJBuck 1 2,765 Mar-28-2019, 08:53 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020