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

Cannot open browser on Windows #7

Closed
maacl opened this issue Mar 25, 2022 · 5 comments
Closed

Cannot open browser on Windows #7

maacl opened this issue Mar 25, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@maacl
Copy link

maacl commented Mar 25, 2022

Following "Getting started" I get the below error. Looks like the Chrome path is invalid. On Windows 11 Chrome is installed in Program Files, not Program Files (x86)\\ and the path should not contain double \.


* (plot:plot-from-file (vglt:save-plot 'cars-plot))

debugger invoked on a SIMPLE-ERROR in thread #<THREAD "main thread" RUNNING {10010B0523}>: Couldn't execute "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe": The system cannot find the file specified.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-EXT:RUN-PROGRAM "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" ("--user-data-dir=C:/Users/marti/AppData/Local/Temp/plot/chrome-data-G784" "--window-size=800,600" "--app=file:///C:/Users/marti/AppData/Local/Temp/plot/cars-plot.html") :ENV NIL :ENVIRONMENT NIL :WAIT NIL :SEARCH T :INPUT NIL :IF-INPUT-DOES-NOT-EXIST :ERROR :OUTPUT NIL :IF-OUTPUT-EXISTS :APPEND :ERROR NIL :IF-ERROR-EXISTS :APPEND :STATUS-HOOK NIL :EXTERNAL-FORMAT :UTF-8 :DIRECTORY NIL :ESCAPE-ARGUMENTS T)
0]
@Symbolics
Copy link
Contributor

Well that's interesting. The file plot/browser.lisp contains the browser commands. There we test for win32 on *features* to set the correct browser path. What we need is a way to distinguish Windows 11 from earlier versions. I'll have to dig around to find out the best way to do that.

In the meantime you can change the path in browser.lisp. The line is:

(defparameter *browser-commands*
  (list (cons :chrome #+win32 "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
...

Change that path to wherever Chrome is.

I'll leave this issue open and move it to the plot project to remind me to find a long-term fix for this. I may just have to test both locations with probe-file.

@Symbolics Symbolics transferred this issue from Lisp-Stat/lisp-stat Mar 25, 2022
@Symbolics Symbolics added the bug Something isn't working label Mar 25, 2022
@maacl
Copy link
Author

maacl commented Mar 25, 2022

Thanks. (setf (nth 0 plot:*browser-commands*) (cons :chrome #+win32 "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe")) works.

@Symbolics
Copy link
Contributor

FYI, you can add that line to your ls-init.lisp initialisation file for a fix that will happen every time you load Lisp-Stat.

@maacl
Copy link
Author

maacl commented Mar 26, 2022 via email

@maacl
Copy link
Author

maacl commented Mar 27, 2022

For others who might want to use the init file to fix this, please note you have to load the plot package first, ie. (asdf:load-system :plot/vglt)

@snunez1 snunez1 closed this as completed Jul 18, 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
Projects
None yet
Development

No branches or pull requests

3 participants