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

make command cannot import cheetah #27

Closed
RyanPrintup opened this issue Mar 10, 2019 · 4 comments
Closed

make command cannot import cheetah #27

RyanPrintup opened this issue Mar 10, 2019 · 4 comments

Comments

@RyanPrintup
Copy link

Every time I attempt to build the demo, the make command fails to import cheetah. make gen_make executed successfully. Cheetah is also installed. Any ideas?

$ make
make[1]: Entering directory '/home/Ryan/fprime/Ref'
cd /home/Ryan/fprime/Fw/Buffer && mkdir -p /home/Ryan/fprime/Fw/Buffer/ac_dep && /usr/bin/python /home/Ryan/fprime/Autocoders/bin/codegen.py --build_root --default_topology_dict --dict_dir Dict BufferSerializableAi.xml --dependency-file /home/Ryan/fprime/Fw/Buffer/ac_dep/BufferSerializableAi.dep
Traceback (most recent call last):
  File "/home/Ryan/fprime/Autocoders/bin/codegen.py", line 49, in <module>
    from generators import GenFactory
  File "/home/Ryan/fprime/Autocoders/src/generators/GenFactory.py", line 28, in <module>
    from visitors import ComponentCppVisitor
  File "/home/Ryan/fprime/Autocoders/src/generators/visitors/ComponentCppVisitor.py", line 16, in <module>
    from generators.templates.component import cpp
  File "/home/Ryan/fprime/Autocoders/src/generators/templates/component/cpp.py", line 18, in <module>
    from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion
ImportError: No module named Cheetah.Version
make[1]: *** [/home/Ryan/fprime/mk/makefiles/ac_targets.mk:1849: /home/Ryan/fprime/Fw/Buffer/BufferSerializableAc.cpp] Error 1
make[1]: Leaving directory '/home/Ryan/fprime/Ref'
Command exited with non-zero status 2
Build Time: 0:02.71
make: *** [/home/Ryan/fprime/mk/makefiles/deployment_makefile.mk:33: ac_lvl4] Error 2

@timcanham
Copy link
Collaborator

This error usually means that Cheetah is not installed in the python version that is running doing the code generation. Do you have multiple installations of Python? Are you sure you installed Cheetah on the one used by the build?

@ljreder
Copy link
Collaborator

ljreder commented Mar 11, 2019

Perhaps your using the wrong version. There is a Python 3 version floating around. We use version 2.4.4. and you can type the command cheetah and will get the following:

reder% cheetah
__ ____________ __
\ / / /
/ * * / CHEETAH 2.4.4 Command-Line Tool
\ | /
\ ==----== / by Tavis Rudd tavis@damnsimple.com
__________/ and Mike Orr sluggoster@gmail.com

USAGE:
------
cheetah compile [options] [FILES ...]     : Compile template definitions
cheetah fill [options] [FILES ...]        : Fill template definitions
cheetah help                              : Print this help message
cheetah options                           : Print options help message
cheetah test [options]                    : Run Cheetah's regression tests
                                               : (same as for unittest)
cheetah version                           : Print Cheetah version number

You may abbreviate the command to the first letter; e.g., 'h' == 'help'.
If FILES is a single "-", read standard input and write standard output.
Run "cheetah options" for the list of valid options.

*** USAGE ERROR ***: not enough command-line arguments

@yashi
Copy link

yashi commented Mar 11, 2019

I have seen this as well.

This could be the same problem with #26. Are you using /usr/bin/python? As you can see from the log, the build system is choosing /usr/bin/python. If you have Cheetah installed for /usr/bin/python but still doesn't work, check environment variables when the command in the log is invoked. The build system might be playing with it.

I'll check my env again when I have time but meanwhile please investigate it.

@RyanPrintup
Copy link
Author

I ended up ditching the Cygwin installation in favor of a Ubuntu VM. Everything is working as expected

r9-pena added a commit to r9-pena/fprime that referenced this issue Jul 21, 2021
LeStarch pushed a commit that referenced this issue Aug 4, 2021
* Create tutorial-support.yml

* Update tutorial-support.yml

GpsApp tutorial to be pulled for build test and submodules to be pulled recursively

* Implementation of tutorial workflow

* typo in repo address

* Added missing github action file

* Changed workflow path

* Changed dir paths

* Work around for workflow

* work around

* troubleshooting

* troubleshoot

* troubleshoot

* Performance update

* Path correction

* troubleshoot

* Dockerfile correction

* path change

* path change

* path fix

* path fix

* path fix

* path fix

* paht fix

* Revert to changes

* Completed workflow for tutorial support

* troubleshoot

* Build path error

* Optimization of workflow

* Path fix

* Path fix

* Path fix #1

* path fix #2

* path check

* Workflow test

* Workflow test #2

* Added logging feature

* Logs Troubleshoot

* Typo fix

* Troubleshoot #1

* Troubleshoot #2

* Corrected typo on path

* Troubleshoot #3

* Troubleshoot #4

* Troubleshoot #5

* Removed log archive feature

* Changed repo path to conform pull request merge

* Test run #1

* test #2

* test #3

* added branch for workflow test

* test #4

* test #4

* test #5

* test #6

* Test #7

* test #8

* test #8

* Test #9

* Test #9

* Test #10

* Test #11

* Test #12

* Test #13

* Test #14

* Test #15

* Test #16

* Test #17

* Test #18

* Test #20

* Test #21

* Test #22

* Test #23

* Test #24

* Test #25

* Split test files

* Split tests #2

* Added executable permissions

* Delete RPI.bash

* Delete Ref.bash

* Delete Framework.bash

* exe files

* Make Framework.bash executable

* Make RPI.bash and Ref.bash executable

* Test #26

* Test #27

* Test #28

* Attached Integration test to Ref test

* Test #29

* Test #30

* Test #31

* Test #32

* Test #33

* Test #34

* Test #35

* Test #35

* Test #37

* Test #38

* Test #39

* Test #40

* Test #41

* Test #42

* Test #43

* Test #43

* Test #44

* Test #45

* Cleaned up files to remove commented code

* Remove CI test branch from workflow

* Incorporated comments for PR

* Modified path for framework job test

* Incoporate reviewer comment for PR

* Incoporated reviewer comment for PR

* Was using incorrect directory for the test

* Revised args call for jobs

* Passing args #1

* Define entrypoint directly from workflow

* Changed entrypoint method

* Changed entrypoint method #2

* Corrected test path

* Syntax correction

* Path Test #1

* Path test #2

* Path Test #4

* Path Test $5

* Test Path #6

* Path Test #6

* Path Test #7

* Path Test #8

* Refactored scripts to remove master.bash

* Corrected test path

* Fixed log problems

* Entrypoint alternative

* Bypassed master.bash file

* Added line for better CI error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants