LCOGT / neoexchange

NEO observing portal
GNU General Public License v3.0
7 stars 1 forks source link

Issue updating physical parameters for (4) Vesta #605

Closed talister closed 1 year ago

talister commented 2 years ago

Running python manage.py update_physical_parameters 4 produced a stack trace:


Traceback (most recent call last):
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/fields/__init__.py", line 1687, in get_prep_value
    return float(value)
ValueError: could not convert string to float: '1%'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/tlister/git/neoexchange/neoexchange/manage.py", line 42, in <module>
    execute_from_command_line(sys.argv)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/home/tlister/git/neoexchange/neoexchange/core/management/commands/update_physical_parameters.py", line 42, in handle
    update_jpl_phys_params(body)
  File "/home/tlister/git/neoexchange/neoexchange/core/views.py", line 3095, in update_jpl_phys_params
    store_jpl_physparams(resp['phys_par'], body)
  File "/home/tlister/git/neoexchange/neoexchange/astrometrics/sources_subs.py", line 2895, in store_jpl_physparams
    saved = body.save_physical_parameters(phys_params)
  File "/home/tlister/git/neoexchange/neoexchange/core/models/body.py", line 548, in save_physical_parameters
    model.objects.create(**kwargs)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/query.py", line 447, in create
    obj.save(force_insert=True, using=self.db)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/base.py", line 753, in save
    self.save_base(using=using, force_insert=force_insert,
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/base.py", line 790, in save_base
    updated = self._save_table(
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/base.py", line 895, in _save_table
    results = self._do_insert(cls._base_manager, using, fields, returning_fields, raw)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/base.py", line 933, in _do_insert
    return manager._insert(
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/query.py", line 1254, in _insert
    return query.get_compiler(using=using).execute_sql(returning_fields)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/sql/compiler.py", line 1396, in execute_sql
    for sql, params in self.as_sql():
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/sql/compiler.py", line 1339, in as_sql
    value_rows = [
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/sql/compiler.py", line 1340, in <listcomp>
    [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/sql/compiler.py", line 1340, in <listcomp>
    [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/sql/compiler.py", line 1281, in prepare_value
    value = field.get_db_prep_save(value, connection=self.connection)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/fields/__init__.py", line 823, in get_db_prep_save
    return self.get_db_prep_value(value, connection=connection, prepared=False)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/fields/__init__.py", line 818, in get_db_prep_value
    value = self.get_prep_value(value)
  File "/home/tlister/venv/neoexchange310_venv/lib64/python3.10/site-packages/django/db/models/fields/__init__.py", line 1689, in get_prep_value
    raise e.__class__(
ValueError: Field 'error' expected a number but got '1%'.```