diff --git a/.changelog/334.bugfix b/.changelog/334.bugfix new file mode 100644 index 00000000..77b85c47 --- /dev/null +++ b/.changelog/334.bugfix @@ -0,0 +1 @@ +Added explanation of why error messages are printed on macOS when opening browser. ([#334](https://github.com/pythonspeed/filprofiler/issues/334)) \ No newline at end of file diff --git a/filprofiler/_tracer.py b/filprofiler/_tracer.py index 11a50157..e3a136c0 100644 --- a/filprofiler/_tracer.py +++ b/filprofiler/_tracer.py @@ -120,6 +120,12 @@ def shutdown(): print("=fil-profile= Wrote HTML report to " + index_path, file=sys.stderr) if open_browser: try: + print( + "=fil-profile= Trying to open the report in a browser.", + "In some cases this may print error messages, especially on macOS.", + "You can ignore those, it's just garbage output from the browser.", + file=sys.stderr, + ) webbrowser.open("file://" + os.path.abspath(index_path)) except webbrowser.Error as e: print(