Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious error message when opening browser on macOS #334

Open
cheshrkat opened this issue Mar 15, 2022 · 6 comments
Open

Spurious error message when opening browser on macOS #334

cheshrkat opened this issue Mar 15, 2022 · 6 comments
Labels
bug Something isn't working ux

Comments

@cheshrkat
Copy link

I'm getting an error message after running fil-profile in OSX Terminal (bash):

0:94: execution error: File some object wasn’t found. (-43)

As a minimal test case, I can reproduce this by following the getting started demo at https://pythonspeed.com/fil/docs/fil/getting-started.html which produces this result:

$ fil-profile run testfil.py 
=fil-profile= Memory usage will be written out at exit, and opened automatically in a browser.
=fil-profile= You can also run the following command while the program is still running to write out peak memory usage up to that point: kill -s SIGUSR2 72175
=fil-profile= Preparing to write to fil-result/2022-03-15T18:43:37.577
=fil-profile= Wrote flamegraph to "fil-result/2022-03-15T18:43:37.577/peak-memory.svg"
=fil-profile= Wrote flamegraph to "fil-result/2022-03-15T18:43:37.577/peak-memory-reversed.svg"
=fil-profile= Wrote HTML report to fil-result/2022-03-15T18:43:37.577/index.html
0:94: execution error: File some object wasn’t found. (-43)

The report does open and looks about right according to the demo (this was my first time using Fil so I'm not super sure :))

I reproduced against python 3.10.2 and 3.8.12 (both installed with pyenv). This is on MacOS Big Sur 11.6.4. Don't have a Monterey machine handy to test that.

I saw some references to this perhaps needing a browser environmental variable, but setting that didn't silence the error. Obviously since it does appear to be working this isn't the end of the world, but it would still be nice to figure out how to fix it :)

@itamarst
Copy link
Collaborator

That's not a real error, that's just Python trying to open browsers one by one until it finds one that works. So you don't have to worry about it. Fil should at least say "please ignore any error messages beyond this point, it's noise", or something.

@itamarst itamarst added bug Something isn't working ux NEXT labels Mar 15, 2022
@itamarst
Copy link
Collaborator

And thank you for reporting this! it's useful to know people find this disconcerting.

@cheshrkat
Copy link
Author

Thanks for the update :) I raised this partly because I'm likely to roll this out to a bigger group, and needed to log messages about "ignore that error" as they definitely get worried if they see errors. So yeah as you say, it's benign but disconcerting.

@itamarst
Copy link
Collaborator

For now adding a warning. Switching to Rust's https://docs.rs/webbrowser/ is a longer-term solution, since it allows suppressing the noise.

itamarst added a commit that referenced this issue Mar 27, 2022
@itamarst
Copy link
Collaborator

The workaround will be in v2022.3.0, which I hope to release today or tomorrow.

@itamarst itamarst removed the NEXT label Mar 27, 2022
@cheshrkat
Copy link
Author

Thanks! :)

@itamarst itamarst changed the title Error on OSX - execution error: File some object wasn’t found. (-43) Spurious error message when opening browser on macOS Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ux
Projects
None yet
Development

No branches or pull requests

2 participants