NASA-AMMOS / NASA-AMMOS/AIT-Core

Bug in ait seq upload

Open
#118 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
56
Forks
35
Avg merge
1d 20h
Merged PRs (30d)
3

Description

if id is not specified, it defaults to None, but then later tries to create and int(None) and breaks the code.

By switching id=0 as default, this allows us to proceed and eventually extract the seqID from the encoded bin file

If this is intentional such that ID is always provided as an argument then it should be in the arg parser.

def init (self, pathname=None, cmddict=None, id=None, version=0):
"""Creates a new AIT Command Sequence

Creates an empty sequence which will be encoded and decoded based
on the given command dictionary (default: cmd.DefaultCmdDict).  If
the optional pathname is given, the command sequence (text or
binary) will be read from it.
"""
self.pathname  = pathname
self.cmddict   = cmddict or cmd.getDefaultCmdDict()
self.crc32     = None
self.seqid     = int(id)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the AIT Command Sequence init shown in the issue and trace the upload path that reaches int(id). Check whether id is expected from the argument parser; done means uploads without an id no longer fail and the seqID can be extracted from the encoded binary file.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.