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

[JOSS] GUI issues on linux #18

Closed
kandersolar opened this issue Sep 3, 2022 · 1 comment
Closed

[JOSS] GUI issues on linux #18

kandersolar opened this issue Sep 3, 2022 · 1 comment

Comments

@kandersolar
Copy link

I ran into two issues with BifacialSimu_src/GUI.py on linux. The first is that the filepaths for logos, help text, configuration files, etc use hardcoded backslashes, but linux (and Mac OS) use forward slashes, and so I get errors like this:

TclError: couldn't open "/home/kevin/projects/BifacialSimu/BifacialSimu_src\Lib\Button_Images\Button-Info-icon.png": no such file or directory

and

FileNotFoundError: [Errno 2] No such file or directory: '/home/kevin/projects/BifacialSimu/BifacialSimu_src\\Lib\\input_albedo\\Albedo.json'

Editing GUI.py to use forward slashes gets it working for me, but of course that might break on Windows. To be cross platform you can use os.path.join or the pathlib standard library (new in python 3.4).


The second issue is that tkinter doesn't like the .ico files even after fixing the filepath. For example I get this:

_tkinter.TclError: bitmap "/home/kevin/projects/BifacialSimu/BifacialSimu_src/Lib/Button_Images/info_logo.ico" not defined

But os.path.exists confirms the file is there, so it must be some incompatibility that I don't understand. Anyway this prevents some things from working, for example the button_SP() window is empty until I comment out the pop_SP.iconbitmap(...) line. I did not try to find a better fix since I assume omitting the icons will not break any functionality.

Cross-reference: openjournals/joss-reviews#4443

@EwaGomez
Copy link
Member

With the newest version #30 BifacialSimu now also works on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants