Nubis-Communications / SignalIntegrity

Python tools for signal integrity applications
https://github.com/TeledyneLeCroy/SignalIntegrity/wiki
Other
134 stars 48 forks source link

App start failed on macOS 11.1 big sur #56

Open madmadcat opened 3 years ago

madmadcat commented 3 years ago

It works on Windows but my macOS.

heres are error messages

  File "/Users/doyouhike/project/WANDTEC/Tools/SignalIntegrity-master/SignalIntegrity/App/SignalIntegrityApp.py", line 1097, in main
    SignalIntegrityApp(projectFileName,external=external)
  File "/Users/doyouhike/project/WANDTEC/Tools/SignalIntegrity-master/SignalIntegrity/App/SignalIntegrityApp.py", line 326, in __init__
    self.UpdateRecentProjectsMenu()
  File "/Users/doyouhike/project/WANDTEC/Tools/SignalIntegrity-master/SignalIntegrity/App/SignalIntegrityApp.py", line 453, in UpdateRecentProjectsMenu
    self.FileMenu.entryconfigure(1,state='disabled')
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2933, in entryconfigure
    return self._configure(('entryconfigure', index), cnf, kw)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 1476, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-state"

And I've tried to comment line 452 to line 455 in SingalIntegrityApp.py

        if all(r is None for r in recentFileList):
            self.FileMenu.entryconfigure(1,state='disabled')
        else:
            self.FileMenu.entryconfigure(1,state='normal')

the App start normally.

PetePupalaikis commented 3 years ago

Interesting. My understanding is that tkinter does not work properly on macOS. It would be good to know if, after commenting out those lines, whether the whole application runs on the mac.

adamtec commented 3 years ago

Hey Pete, I can confirm that if the state parameter is removed, then the app works fine on MacOS.

PetePupalaikis commented 3 years ago

Interesting. is it just this one place? or are there others? If you can identify all of the places, I'd be happy to make the change (maybe just wrap it in a try-catch, or do an os test prior to such lines.

Pete

Phi-sqrd commented 2 weeks ago

@PetePupalaikis @madmadcat Tested on MacOs Monterey ver. 12.3.1. I can also confirm that commenting out if all(r is None for r in recentFileList): self.FileMenu.entryconfigure(1,state='disabled') else: self.FileMenu.entryconfigure(1,state='normal')

resolves the error.  

**Error Report:**

When attempting to run the SignalIntegrity application, I encountered the following error and its the only one:

Traceback (most recent call last): File "/path/to/SignalIntegrity/myenv/bin/SignalIntegrity", line 8, in sys.exit(main()) File "/path/to/SignalIntegrity/SignalIntegrity/App/SignalIntegrityApp.py", line 1491, in main SignalIntegrityApp(args.filename, pwd=args.pwd, external=args.external, args=argsDict) File "/path/to/SignalIntegrity/SignalIntegrity/App/SignalIntegrityApp.py", line 382, in init self.UpdateRecentProjectsMenu() File "/path/to/SignalIntegrity/SignalIntegrity/App/SignalIntegrityApp.py", line 600, in UpdateRecentProjectsMenu self.FileMenu.entryconfigure(1, state='normal') File "/opt/miniconda3/lib/python3.12/tkinter/init.py", line 3440, in entryconfigure return self._configure(('entryconfigure', index), cnf, kw) File "/opt/miniconda3/lib/python3.12/tkinter/init.py", line 1706, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: unknown option "-state"