Open jpettingale opened 3 months ago
Maybe try to downgrade astropy to 5.x. If this wont help try to install from here: https://github.com/ryanvolz/srt-py (explanation: https://github.com/MITHaystack/srt-py/pull/20)
Installing from the other repository works, thank you! I will work on downgrading astropy….
From: AlexKurek @.> Sent: Wednesday, July 24, 2024 11:57 AM To: MITHaystack/srt-py @.> Cc: jpettingale @.>; Author @.> Subject: Re: [MITHaystack/srt-py] Runtime error (Issue #30)
Maybe try to downgrade astropy to 5.x. If this wont help try to install from here: https://github.com/ryanvolz/srt-py (explanation: #20 https://github.com/MITHaystack/srt-py/pull/20 )
— Reply to this email directly, view it on GitHub https://github.com/MITHaystack/srt-py/issues/30#issuecomment-2248492692 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AUE2KJOIXYHVAS66R4MCKK3ZN7MHBAVCNFSM6AAAAABLMRTQJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBYGQ4TENRZGI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AUE2KJPKNRE7XPHUDKTY4W3ZN7MHBA5CNFSM6AAAAABLMRTQJGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUGAVDJI.gif Message ID: @. @.> >
@jpettingale Could you check if you get this error on my fork (https://github.com/AlexKurek/srt-py, https://github.com/AlexKurek/srt-py/blob/master/CHANGELOG.rst#srt-py-change-log)? If not, it would mean that there is a regression in the last 3 commits here.
Your fork works fine:
jonathan@ezra:~$ conda activate srtpy (srtpy) jonathan@ezra:~$ srt_runner.py --config_dir=/home/jonathan/srt-py/config gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.10.0 built-in source types: file fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya Found Rafael Micro R820T tuner [INFO] Opening Generic RTL2832U OEM :: 00000001... Found Rafael Micro R820T tuner [INFO] Using format CF32. Enabled direct sampling mode, input 2 [R82XX] PLL not locked! Disabled direct sampling mode pagesize :debug: Setting pagesize to 4096 B top_block_impl :debug: Using default scheduler "TPB" Allocating 15 zero-copy buffers Setting Frequency Setting Sample Rate Setting Motor Azimuth Setting Motor Elevation Setting Motor GalLat Setting Motor GalLon Setting Object Tracking Setting System Temp Setting Calibration Temp Setting Calibration Power Setting Calibration Values Setting Is Running GOTO_STOW_AT_STARTUP option is on; running command 'stow' 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:01] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:02] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:03] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:03] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:03] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [25/Jul/2024 05:13:03] "POST / HTTP/1.1" 200 -
Alex, I have a bug report on your fork, it is attached. Bug report AlexKurek srt.pdf
@jpettingale thank you for this. The first error may be also present in the main repository, since I haven't touched rot2 motor class.
For the other two the actual error is:
TypeError: Object of type float32 is not JSON serializable
. I may have added something to the status without casting a type. Are you using configuration files from my fork? I added a few parameters there and for the moment they are not compatible with the main repo.
When running the software I get the following error messages:
jonathan@ezra:~$ conda activate (base) jonathan@ezra:~$ srt_runner.py --config_dir=/home/jonathan/srt-py/config {'SOFTWARE': 'Small Radio Telescope', 'STATION': {'latitude': 34.66, 'longitude': -86.05, 'name': 'Scottsboro'}, 'EMERGENCY_CONTACT': {'name': 'Jonathan Pettingale', 'email': 'jpettingale@gmail.com', 'phone_number': '555-555-5555'}, 'AZLIMITS': {'lower_bound': 5.0, 'upper_bound': 355.0}, 'ELLIMITS': {'lower_bound': 0.0, 'upper_bound': 89.0}, 'STOW_LOCATION': {'azimuth': 270.0, 'elevation': 0.0}, 'CAL_LOCATION': {'azimuth': 270.0, 'elevation': 0.0}, 'HORIZON_POINTS': [{'azimuth': 0, 'elevation': 0}, {'azimuth': 120, 'elevation': 5}, {'azimuth': 240, 'elevation': 5}, {'azimuth': 360, 'elevation': 0}], 'MOTOR_TYPE': 'NONE', 'MOTOR_PORT': '/dev/ttyUSB0', 'MOTOR_BAUDRATE': 600, 'RADIO_CF': 1420000000, 'RADIO_SF': 2400000, 'RADIO_FREQ_CORR': -50000, 'RADIO_NUM_BINS': 256, 'RADIO_INTEG_CYCLES': 100000, 'RADIO_AUTOSTART': True, 'NUM_BEAMSWITCHES': 25, 'BEAMWIDTH': 7.0, 'TSYS': 171, 'TCAL': 290, 'SAVE_DIRECTORY': '~/Desktop/SRT-Saves', 'RUN_HEADLESS': False, 'DASHBOARD_PORT': 8080, 'DASHBOARD_HOST': '127.0.0.1', 'DASHBOARD_DOWNLOADS': True, 'DASHBOARD_REFRESH_MS': 3000} Process SRT-Dashboard: Traceback (most recent call last): File "astropy/io/ascii/cparser.pyx", line 304, in astropy.io.ascii.cparser.CParser.setup_tokenizer TypeError: can only join an iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/jonathan/miniconda3/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/home/jonathan/miniconda3/lib/python3.12/multiprocessing/process.py", line 108, in run self._target(*self._args, self._kwargs) File "/home/jonathan/miniconda3/bin/srt_runner.py", line 26, in run_srt_dashboard appserver, = srt_app.generate_app(configuration_dir, configuration_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/srt/dashboard/app.py", line 162, in generate_app monitor_page.generate_layout(config_dict["SOFTWARE"]), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/srt/dashboard/layouts/monitor_page.py", line 843, in generate_layout generate_popups(software), ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/srt/dashboard/layouts/monitor_page.py", line 290, in generate_popups all_objects = get_all_objects() ^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/srt/dashboard/layouts/monitor_page.py", line 51, in get_all_objects table = Table.read(Path(root_folder, config_file), format="ascii.csv") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/table/connect.py", line 62, in call out = self.registry.read(cls, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/io/registry/core.py", line 221, in read data = reader(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/io/ascii/connect.py", line 19, in io_read return read(filename, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/utils/decorators.py", line 603, in wrapper return function(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/utils/decorators.py", line 603, in wrapper return function(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/utils/decorators.py", line 603, in wrapper return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ [Previous line repeated 2 more times] File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/io/ascii/ui.py", line 428, in read dat = fast_reader_rdr.read(table) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jonathan/miniconda3/lib/python3.12/site-packages/astropy/io/ascii/fastbasic.py", line 131, in read self.engine = cparser.CParser( ^^^^^^^^^^^^^^^^ File "astropy/io/ascii/cparser.pyx", line 242, in astropy.io.ascii.cparser.CParser.cinit File "astropy/io/ascii/cparser.pyx", line 306, in astropy.io.ascii.cparser.CParser.setup_tokenizer TypeError: Input "table" must be a file-like object, a string (filename or data), or an iterable WARNING: AstropyDeprecationWarning: The get_moon function is deprecated and may be removed in a future version. Use get_body("moon") instead. [srt.daemon.utilities.object_tracker] WARNING:astropy:AstropyDeprecationWarning: The get_moon function is deprecated and may be removed in a future version. Use get_body("moon") instead. WARNING: AstropyDeprecationWarning: The get_moon function is deprecated and may be removed in a future version. Use get_body("moon") instead. [srt.daemon.utilities.object_tracker] WARNING:astropy:AstropyDeprecationWarning: The get_moon function is deprecated and may be removed in a future version. Use get_body("moon") instead. WARNING: TimeDeltaMissingUnitWarning: Numerical value without unit or explicit format passed to TimeDelta, assuming days [astropy.time.core] WARNING:astropy:TimeDeltaMissingUnitWarning: Numerical value without unit or explicit format passed to TimeDelta, assuming days test (270.0, 0.0) gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.10.0 built-in source types: file fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy airspyhf soapy redpitaya Found Rafael Micro R820T tuner [INFO] Opening Generic RTL2832U OEM :: 00000001... Found Rafael Micro R820T tuner [INFO] Using format CF32. Enabled direct sampling mode, input 2 [R82XX] PLL not locked! Disabled direct sampling mode pagesize :debug: Setting pagesize to 4096 B top_block_impl :debug: Using default scheduler "TPB" Allocating 15 zero-copy buffers Setting Frequency Setting Sample Rate Setting Motor Azimuth Setting Motor Elevation Setting Motor GalLat Setting Motor GalLon Setting Object Tracking Setting System Temp Setting Calibration Temp Setting Calibration Power Setting Calibration Values Setting Is Running (5.0, 0.0) 127.0.0.1 - - [24/Jul/2024 13:50:43] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:43] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:43] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:43] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:43] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:44] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:45] "POST / HTTP/1.1" 200 - (5.0, 0.0) (270.0, 0.0) 127.0.0.1 - - [24/Jul/2024 13:50:45] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:45] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:45] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [24/Jul/2024 13:50:45] "POST / HTTP/1.1" 200 - (270.0, 0.0) (270.0, 0.0) (270.0, 0.0)
The result being that you cannot connect to the dashboard