Goldstone comma separated value file sometimes isn't...
Closed this issue · 0 comments
talister commented
The current version of the Goldstone target file has a mistake in it:
1943,Anteros,5/25/2026/6/2/2026,0
which causes a failure in parsing:
# python3 manage.py fetch_goldstone_targets
==== Fetching Goldstone targets 2023-07-06 23:51 ====
Downloading https://echo.jpl.nasa.gov/asteroids/GSSR_schedule.csv
|======================================================================================================| 6.1k/6.1k (100.00%) 0s
Traceback (most recent call last):
File "/var/www/apps/neoexchange/manage.py", line 42, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
File "/var/www/apps/neoexchange/core/management/commands/fetch_goldstone_targets.py", line 30, in handle
radar_targets = fetch_goldstone_targets()
File "/var/www/apps/neoexchange/astrometrics/sources_subs.py", line 1323, in fetch_goldstone_targets
start_date = datetime.strptime(row['start (UT)'], '%m/%d/%Y')
File "/usr/lib64/python3.9/_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/lib64/python3.9/_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: /6/2/2026