fprime icon indicating copy to clipboard operation
fprime copied to clipboard

missing import in run_deployment.py

Open shalevm opened this issue 3 years ago • 2 comments

F´ Version 3.1.0
Affected Component fprime_gds


Problem Description

following the INSTALL.md tutorial, when testing F´ GDS Installation Via Running HTML GUI, namely: fprime-gds -g html -r <path to fprime checkout>/Ref/build-artifacts

i got a python error from line 23 in the run_deployment.py file: root = Path(args.root_dir)

that indicated that Path was unknown, and indeed, the relevant import was missing. adding the line from pathlib import Path fix it.

How to Reproduce

  1. see above

Expected Behavior

no errors should occur...

shalevm avatar Jul 12 '22 15:07 shalevm

I have just run into the same issue, I think it is probably caused by this commit to the fprime-gds: https://github.com/fprime-community/fprime-gds/commit/97f549285d6311bb2f75b6735f66da25bf4453f4

I have filed a ticket in that project: https://github.com/fprime-community/fprime-gds/issues/86

rmelick-muon avatar Jul 13 '22 17:07 rmelick-muon

Not adding anything new, but I just wanted to emphasize that this is indeed quickly reproducible and comes as the first issue when following the instructions in INSTALL.md:

(fprime-venv) <userName>@<systemName> Ref % fprime-gds -g html -r ./build-artifacts
Traceback (most recent call last):
  File "/Users/<userName>/fprime-venv/bin/fprime-gds", line 8, in <module>
    sys.exit(main())
  File "/Users/<userName>/fprime-venv/lib/python3.9/site-packages/fprime_gds/executables/run_deployment.py", line 277, in main
    settings = vars(get_settings())
  File "/Users/<userName>/fprime-venv/lib/python3.9/site-packages/fprime_gds/executables/run_deployment.py", line 23, in get_settings
    root = Path(args.root_dir)
NameError: name 'Path' is not defined

It would be nice to bring back the required imports (pathlib.Path and sys) and add/revert some changes (I just tested the code from the PR that Russell made and it works/lgtm!) soon so that new fprime users don't have a problem with the initial setup or verification of the GDS installation.

Anirban166 avatar Jul 19 '22 05:07 Anirban166

This is fixed:

pip install -U fprime-gds

To get the latest fprime GDS, which will prevent this issue.

LeStarch avatar Aug 16 '22 17:08 LeStarch

Thanks Michael.

shalevm avatar Aug 16 '22 21:08 shalevm