Skip to content

ValueError: block already occupied #368

@gnthibault

Description

@gnthibault

Dear developer of Astroplan,

Thank you for this software, the capabilities are really interesting.
I am trying to leverage the power of astroplan into one of my project, unfortunately, I had trouble trying to integrate something very similar to this tutorial in my code:
http://astroplan.readthedocs.io/en/latest/tutorials/scheduling.html

I have not been able to generate a MWE yet, because my code includes sensitive informations, like gps coordinates. But this error may be simple to solve, here is why I reproduce the call stack hereafter:

Traceback (most recent call last):

  File "./ObservationPlanner/ObservationPlanner.py", line 108, in gen_schedule
    self.schedule = prior_scheduler(obs_blocks, priority_schedule)
  File "/home/user/anaconda3/lib/python3.6/site-packages/astroplan/scheduling.py", line 542, in __call__
    schedule = self._make_schedule(copied_blocks)
  File "/home/user/anaconda3/lib/python3.6/site-packages/astroplan/scheduling.py", line 791, in _make_schedule
    _is_scheduled = self.attempt_insert_block(b, new_start_time, start_time_idx)
  File "/home/user/anaconda3/lib/python3.6/site-packages/astroplan/scheduling.py", line 821, in attempt_insert_block
    raise ValueError('block already occupied')
ValueError: block already occupied

How can I debug this ? Thank you in advance for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions