Skip to main content
 首页 » 编程设计

python之Google 通讯录插入中的性别更改为 "Directory server"

2025年05月04日15shihaiming

我正在使用 gdata-python-client 库 (http://code.google.com/p/gdata-python-client/) 将联系人插入 Google 帐户。当我这样设置性别时:

google_contact.gender = gdata.contacts.data.Gender(text="Male") 

它实际上是在“目录服务器”字段中的联系人上设置的。

知道为什么会发生这种情况吗?

以防万一,我的代码在 Google App Engine 开发服务器上运行。

请您参考如下方法:

真的,我告诉你,这确实是gData客户端的一个bug。这是 line containing the bug ,这里是 bug report我就这个问题提出了申请,并且here's a patch我已提交解决问题

在上游修复未决时修补本地库副本的细节留给读者作为练习。