Analyze Datasets and Train ML Models using AutoML week4 assignement giving error

when I am running the below code and getting error: TypeError: Descriptors cannot not be created directly.
If this call came from a file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

how to resolve this ?


import boto3
import sagemaker
import pandas as pd
import numpy as np
import botocore

config = botocore.config.Config(user_agent_extra=‘dlai-pds/c1/w4’)

low-level service client of the boto3 session

sm = boto3.client(service_name=‘sagemaker’,

sm_runtime = boto3.client(‘sagemaker-runtime’,

sess = sagemaker.Session(sagemaker_client=sm,

bucket = sess.default_bucket()
role = sagemaker.get_execution_role()
region = sess.boto_region_name

I am getting same error for week 2, and week 3 assigment as well.

I got the same error for Course 1 Week 3 Assignment.

Any luck solving this error?