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

xtce_converter: uninitialized constant USERPATH #1330

Closed
stanislaw opened this issue Jul 28, 2021 · 3 comments
Closed

xtce_converter: uninitialized constant USERPATH #1330

stanislaw opened this issue Jul 28, 2021 · 3 comments
Labels
Milestone

Comments

@stanislaw
Copy link
Contributor

stanislaw commented Jul 28, 2021

Describe the bug

Background: We are learning about the support of XTCE in COSMOS.

We get uninitialized constant USERPATH error when we run the following command:

xtce_converter --system "cosmos/spec/install/config/system/system.txt" --export exported-configs

To Reproduce

  1. Install all necessary system and Ruby dependencies based on this Docker file: https://github.com/BallAerospace/cosmos-docker/blob/master/ubuntu18.04/Dockerfile.

  2. Run the xtce_converter command above.

  3. See the following error message:

... COSMOS (master)$ xtce_converter --system "cosmos/spec/install/config/system/system.txt" --export exported-configs
uninitialized constant USERPATH
Usage: xtce_converter [options] --import input_xtce_filename output_dir
       xtce_converter [options] --export output_dir

    -h, --help                       Show this message
    -v, --version                    Show version
        --system VALUE               Use an alternative system.txt file
    -i, --import VALUE               Import the specified .xtce file
    -e, --export                     Create .xtce file(s) from the COSMOS Configuration

Expected behavior

We see no error messages and can export/import XTCE.

Screenshots

-

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]
  • COSMOS Version, latest master 194c0fe
@stanislaw
Copy link
Contributor Author

Some more information here:

I can confirm that the import command seems to work:

xtce_converter --import '.../test.xtce' test-output
Processing .../test.xtce...
  Ignoring Unknown: <AncillaryDataSet>
  Ignoring Unknown: <AncillaryData>
  Ignoring Unknown: <AncillaryData>
  Ignoring Unknown: <ValidRangeSet>
Converting to COSMOS config files in test-output
Success
$ ls -l test-output/
total 8
drwxrwxr-x 3 stanislaw stanislaw 4096 Jul 29 11:07 MYCOMMAND
drwxrwxr-x 3 stanislaw stanislaw 4096 Jul 29 11:07 MYSTRUCTURE

At the same time I don't understand what are the preconditions for running the export command. The help says:

       xtce_converter [options] --export output_dir

      -e, --export                     Create .xtce file(s) from the COSMOS Configuration

Should the argument to --export to be a pass to the COSMOS configuration or simply to the output folder (I assume the latter)? If the latter is true, then what is the expectation of the xtce_converter about the folder from which it should be run?

So far all my attempts result in the uninitialized constant USERPATH and the help message like in the first message in this issue.

The documentation here does not provide enough detail for us to understand the expected workflow. We are happy to submit a PR to the docs once we know how to use the export command.

@ghost
Copy link

ghost commented Jul 29, 2021

Can you try running the xtce_converter from the root of your COSMOS configuration, e.g. where the config, lib, outputs, tmp directories are?

It looks like specifying the --system option uses the USERPATH variable. Try leaving this off and using the default system.txt file and see if that helps.

@ghost ghost added the bug label Aug 6, 2021
@ghost ghost self-assigned this Aug 6, 2021
@stanislaw
Copy link
Contributor Author

stanislaw commented Aug 17, 2021

Sorry for not getting back to this one. We have paused the XTCE/CCDD track for some time because of some other errors (usability of CCDD and interfacing with COSMOS) and are working with COSMOS text files directly.

We are also looking into moving to ASN1 as a primary TM/TC storage format but no decisions are being made yet.

@ghost ghost added this to the v4.5.1 milestone Sep 21, 2021
@ghost ghost closed this as completed Sep 21, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant