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개 답변
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

답변함 일 년 전
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

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠