Python 3.x sagemaker端点内容类型can';t集属性

Python 3.x sagemaker端点内容类型can';t集属性,python-3.x,amazon-sagemaker,Python 3.x,Amazon Sagemaker,我正试图通过以下aws笔记本创建欺诈检测模型: 在“主机随机砍伐森林”部分,在 rcf_predictor.content_type = 'text/csv' 我得到这个错误: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <

我正试图通过以下aws笔记本创建欺诈检测模型:

在“主机随机砍伐森林”部分,在

rcf_predictor.content_type = 'text/csv'
我得到这个错误:

   ---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-bd790d3851f9> in <module>
      1 from sagemaker.predictor import csv_serializer, json_deserializer
      2 
----> 3 rcf_predictor.content_type = 'text/csv'
      4 rcf_predictor.serializer = csv_serializer
      5 rcf_predictor.accept = 'application/json'

AttributeError: can't set attribute
---------------------------------------------------------------------------
AttributeError回溯(最近一次呼叫上次)
在里面
1从sagemaker.predictor导入csv_序列化程序、json_反序列化程序
2.
---->3 rcf_predictor.content_type='text/csv'
4 rcf_predictor.serializer=csv_序列化程序
5 rcf_predictor.accept='application/json'
AttributeError:无法设置属性
这个错误是什么?如何解决它?

试试这个(用这个删除第3行)

我只是尝试以不同的方式设置属性。

试试这个(用这个删除第3行)

我只是尝试不同地设置属性

rcf_predictor.__setattr__(rcf_predictor.content_type, "text/csv")