ModuleNotFoundError: No module named '_awscrt' - aws greengrass

0

This was working fine till yesterday and suddenly my component stopped working when I did a revise deployment Getting error ModuleNotFoundError: No module named '_awscrt'. On my component artifacts-unarchived location I can see the python packages are available I see the packages folder awscrt, awsiot, boto3, botocore all packages that needed but when I try import from awsiot.greengrasscoreipc.clientv2 import GreengrassCoreIPCClientV2, getting ModuleNotFoundError: No module named '_awscrt' I am using the awsiotsdk==1.9.2, I also tried installing awscrt==0.13.3, awsiot==0.1.3 but no luck still getting the error ModuleNotFoundError: No module named '_awscrt'. Need advise to fix this issue.

2 Answers
1

Hello

I understand that, you are getting error 'ModuleNotFoundError' with an error message 'No module named _awscrt' when you revised a deployment which was working fine before . You can see the python packages are available in your component artifacts-unarchived location in packages folder awscrt, awsiot, boto3, botocore. However, when you try to import from awsiot.greengrasscoreipc.clientv2 import GreengrassCoreIPCClientV2, you are observing the above mentioned error.

Can you please perform either of the following to see if the mentioned issue is mitigated:

  1. Try installing the package as a 'ggc_user" directly which ensures that whatever was missing from the artifact is now being picked up from the ggc_user site-packages.

=== sudo -u ggc_user python3 -m pip install awsiotsdk

  1. You can also specify the installation of necessary packages/libraries in the lifecycle section[1] of your component's recipe.

=== Lifecycle: Install: RequiresPrivilege: true Script: | python3 -m pip install awsiotsdk

Please look into the below custom component's recipe in the below workshop link for your reference : [+] https://catalog.workshops.aws/greengrass/en-US/chapter5-pubsubipc/10-step1

References:

[1] AWS IoT Greengrass component recipe reference - https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html

answered a year ago
0

Thanks the mitigation worked for us, the actual problem is on the CI pipeline where there were few modifications on the component configurations and it started failing. Now its been fixed and working

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions