Skip to content

Commit

Permalink
We have regular issues with errors ending in:
Browse files Browse the repository at this point in the history
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/rollbar/__init__.py", line 1026, in _add_locals_data
if arginfo.locals and _check_add_locals(cur_frame, frame_num, num_frames):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/rollbar/__init__.py", line 1129, in _check_add_locals
('root' in SETTINGS and (frame.get('filename') or '').lower().startswith((SETTINGS['root'] or '').lower()))))
                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'lower'

rollbar/pyrollbar#345 suggests this is caused by rollbar reciving a PosixPath not a string, so we coerce it before passing it to the config.
  • Loading branch information
dragon-dxw committed Aug 24, 2023
1 parent bf2e317 commit 17e58b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
ROLLBAR = {
"access_token": env("ROLLBAR_ACCESS_TOKEN"),
"environment": env("ROLLBAR_ENV"),
"root": ROOT_DIR,
"root": str(ROOT_DIR),
}

rollbar.init(**ROLLBAR)
Expand Down

0 comments on commit 17e58b5

Please sign in to comment.