You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to save the log in a file as OutputWriter(output=open('page_view.log','a'), transform=lambda s: str(s)). In the output file I find that user_agent shows as 'user_agent': <UserAgent 'chrome'/74.0.3729.169>
It should be fine for storage backends, but it's a little bit problematic for an output file. (i.e json.dumps get TypeError: <UserAgent 'chrome'/74.0.3729.169> is not JSON serializable)
Python 3.5.2
flask 0.12.2
I am trying to save the log in a file as
OutputWriter(output=open('page_view.log','a'), transform=lambda s: str(s))
. In the output file I find that user_agent shows as'user_agent': <UserAgent 'chrome'/74.0.3729.169>
It should be fine for storage backends, but it's a little bit problematic for an output file. (i.e json.dumps get
TypeError: <UserAgent 'chrome'/74.0.3729.169> is not JSON serializable
)For the user_agent field:
flask-track-usage/src/flask_track_usage/__init__.py
Line 160 in cceb0d2
Is it better like this?
or
The text was updated successfully, but these errors were encountered: