Skip to content

calculation.py:traverse() test failure #11

Description

@drf5n

I get an error when running the self-test on calculations.py:

$ python calculation.py
Result for impossible intersection:
p4 -3.82805968326e+17 -3.82805968326e+17
Result for observe each other:
p5 181.019335984 181.019335984
Traceback (most recent call last):
  File "calculation.py", line 1046, in <module>
    [s114otra,o114_113otra,o114_115otra],[s115otra,None,None] ] )
  File "calculation.py", line 407, in traverse
    pcode = (trav_obs[i][0].p.pc if trav_obs[i][0].p.pc is not None else "-")
AttributeError: 'NoneType' object has no attribute 'pc'

it is this line:

https://github.com/zsiki/ls/blob/master/calculation.py#L407

triggered by the call around here:

https://github.com/zsiki/ls/blob/master/calculation.py#L1046

I'm not sure if the input to the test is valid or invalid, or if traverse() should protect against that final point.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions