Learn business growth with Google Analytics 4 Forums Google Analytics 4 Troubleshooting 'google.rpc' Module Error While Running Google Analytics Data API on AWS Lambda Python Function Reply To: Troubleshooting 'google.rpc' Module Error While Running Google Analytics Data API on AWS Lambda Python Function

  • Addison

    Member
    6 April 2023 at 1:23 pm

    The error message you received indicates that the ‘google.rpc’ module was not found. This module is included in the ‘grpcio’ library. The version 1.51.1 of this library you are currently using might not have been installed correctly, thus causing the import error. I would recommend you to uninstall the ‘grpcio’ and ‘grpcio-tools’ libraries and then reinstall updated versions. Following this, repackage your AWS Lambda function and its dependencies. If this does not work, try adding the ‘googleapis-common-protos’ Python package to your AWS Lambda package as well, as the ‘google.rpc’ error might be related to protocol buffers, which are covered by this package.