jmason86 / MinXSS_Beacon_Decoder

Beacon decoder for the MinXSS CubeSat in space; MinXSS-2 launch on 2018-11-19
http://lasp.colorado.edu/home/minxss
GNU General Public License v3.0
11 stars 6 forks source link

Run on Windows? #27

Open K4KDR opened 5 years ago

K4KDR commented 5 years ago

On Windows 7 (64-bit), after installing the latest Python-3 (Python 3.7) and all the modules that were reported missing when attempting to run:

python minxss_beacon_decoder.py

Here is the output (followed by commands showing the currently running commit version and python version installed):

C:\Users\CSI\Apps\MinXSS_Beacon_Decoder>python minxss_beacon_decoder.py

libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "C:\Users\CSI\Apps\Python37\lib\configparser.py", line 788, in get
    value = d[option]
  File "C:\Users\CSI\Apps\Python37\lib\collections\__init__.py", line 914, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "C:\Users\CSI\Apps\Python37\lib\collections\__init__.py", line 906, in __missing__
    raise KeyError(key)
KeyError: 'serial_port'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "minxss_beacon_decoder.py", line 634, in <module>
    main()
  File "minxss_beacon_decoder.py", line 628, in main
    mainWin = MainWindow()
  File "minxss_beacon_decoder.py", line 39, in __init__
    self.setup_last_used_settings()
  File "minxss_beacon_decoder.py", line 151, in setup_last_used_settings
    self.set_instance_variables_from_config(parser)
  File "minxss_beacon_decoder.py", line 171, in set_instance_variables_from_config
    self.comboBox_serialPort.insertItem(0, parser.get('input_properties', 'serial_port'))
  File "C:\Users\CSI\Apps\Python37\lib\configparser.py", line 791, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'serial_port' in section: 'input_properties'

======

C:\Users\CSI\Apps\MinXSS_Beacon_Decoder>git show --oneline -s

9998410 (HEAD -> master, origin/master, origin/HEAD) Auto updates output files when user changes ground station parameters

======

C:\Users\CSI\Apps\MinXSS_Beacon_Decoder>python --version

Python 3.7.0

======

Kindly advise if there are additional items required to run the current code on a Windows system.

Thank you!

jmason86 commented 5 years ago

It looks like the serial_port is missing from the input_properties.cfg. Could you also post the log/ file and the input_properties.cfg file?

K4KDR commented 5 years ago

Ok, that feedback identified the problem and solved a mystery. When I attempted to run the app initially (and got these errors), I noted that there was NO input_properties.cfg file present in the folder where I was running the app from. I copied over my working .cfg file from the linux computer but the errors were exactly the same.

Following your reply above, I searched the ENTIRE computer for any instances of input_properties.cfg and found the old MinXSS-1 version in:

C:\Users\{username}\MinXSS_Beacon_Decoder

... when I renamed that file to in effect remove it from the computer and re-ran the current app, a properly-formatted input_properties.cfg file was created in:

C:\Users\{username}\MinXSS_Beacon_Decoder

... and the application GUI launched successfully.

Would it be possible (and probably recommended) for the .cfg file to be created in whatever folder the user is running the application from & not hard-coded to a specific location?

K4KDR commented 5 years ago

Additional: With the app now running successfully on Windows-7 (64-bit), recorded sample audio was decoded successfully:

2018-10-05--minxss-2--windows-test

K4KDR commented 5 years ago

Additional: Please note that the folder path used on the Windows platform for OUTPUT and LOG files also appears to be hard-coded to the

C:\Users\{username}\MinXSS_Beacon_Decoder

location.

jmason86 commented 5 years ago

Yes it is sort of hard coded in there to always be in that specific location. That came about because the built application will actually fail to even launch if it's set to the current directory (this is what it was originally). I think it has to do with permissions in the directory that the application runs or something.

There's got to be a way to have it both ways... I keep trying to think of a way to add/use a user specified working directory path to the Input/Options but keep running into issues that have already caused crashes in the past.

I'll keep thinking about this one.