I often get a callback such as the below, or much more complex.
The actual error is in my code, but I have to read through the whole stacktrace to see where my code begins.
Is there a way to remove logging for library code?
this would remove the last two lines from this so I could go right to the problem code.
also every line spits out two errors vis:
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/tools/digby/chat_log.py", line 26, in pipeline
self.transform()
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/cli.py", line 134, in <module>
Cli.pipeline(config, sample=2000,
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/cli.py", line 99, in pipeline
chat_log.pipeline(df=df) # read df from bq
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/tools/digby/chat_log.py", line 26, in pipeline
self.transform()
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/tools/digby/chat_log.py", line 107, in transform
df['start_page'] = df['page_display_name'].shift(1)
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/venv/lib/python3.9/site-packages/pandas/core/frame.py", line 3455, in __getitem__
indexer = self.columns.get_loc(key)
File "/usr/local/x/home/dcollier/dev/fbl/scoobi/venv/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc
raise KeyError(key) from err
KeyError: 'page_display_name'