Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in HORIZONS ephemeris filtering (TypeError: Cannot convert fill_value ? to dtype bool) #462

Closed
talister opened this issue Jul 24, 2020 · 1 comment · Fixed by #463
Assignees
Labels

Comments

@talister
Copy link
Member

View details in Rollbar: https://rollbar.com/LCO/NEOexchange/items/154/

Traceback (most recent call last):
  File "/opt/lcogt-python36/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/var/www/apps/neoexchange/core/plots.py", line 196, in make_visibility_plot
    vis_file = plot_hoursup(ephem, site_code, add_rate=to_add_rate, alt_limit=tel_alt_limit, base_dir=base_dir)
  File "/var/www/apps/neoexchange/photometrics/obsgeomplot.py", line 331, in plot_hoursup
    visible_dates, hours_visible = determine_hours_up(ephem_ca, site_code, dbg)
  File "/var/www/apps/neoexchange/photometrics/obsgeomplot.py", line 299, in determine_hours_up
    & (ephem_ca['solar_presence'] != 'C') & (ephem_ca['solar_presence'] != 'N')]
  File "/opt/lcogt-python36/lib/python3.6/site-packages/astropy/table/column.py", line 991, in _compare
    result = getattr(super(), op)(other)
  File "/opt/lcogt-python36/lib/python3.6/site-packages/astropy/table/column.py", line 359, in __array_finalize__
    super().__array_finalize__(obj)
  File "/opt/lcogt-python36/lib/python3.6/site-packages/numpy/ma/core.py", line 3063, in __array_finalize__
    self._fill_value = _check_fill_value(self._fill_value, self.dtype)
  File "/opt/lcogt-python36/lib/python3.6/site-packages/numpy/ma/core.py", line 474, in _check_fill_value
    raise TypeError(err_msg % (fill_value, ndtype))
TypeError: Cannot convert fill_value ? to dtype boolTraceback (most recent call last):
  File "/opt/lcogt-python36/lib/python3.6/site-packages/numpy/ma/core.py", line 468, in _check_fill_value
    fill_value = np.array(fill_value, copy=False, dtype=ndtype)
ValueError: invalid literal for int() with base 10: '?'
@talister talister self-assigned this Jul 24, 2020
@talister talister added the bug label Jul 24, 2020
@talister talister changed the title TypeError: Cannot convert fill_value ? to dtype bool Error in HORIZONS ephemeris filtering (TypeError: Cannot convert fill_value ? to dtype bool) Jul 24, 2020
@talister
Copy link
Member Author

talister commented Jul 24, 2020

This is being generated by an interaction between astropy >=3.2.2 and a numpy bug as I filed back in October 2019: astropy/astropy#9374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant