标签: windows python-3.x error-handling event-log
要写入Windows事件日志,我有以下脚本:
.... win32evtlogutil.ReportEvent( "TEST001", 101, eventType=0, data = err_log_path + 'error_TEST001.log' ) ...
但是我收到以下错误:
TypeError: a bytes-like object is required, not 'str'
我该怎么办?