gmail python客户端api导入消息显示语法错误 [英] gmail python client api import message shows Syntax error

查看:119
本文介绍了gmail python客户端api导入消息显示语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gmail python api service.users().messages().import显示语法错误,这是代码行

gmail python api service.users().messages().import shows Syntax error here is line of code

mgg = services.users().messages().import(userId='me', raw=base64.urlsafe_b64encode(mime_msg.as_string()), labelIds=mime_msg.get('labelIds')).execute()

import(

如果我将import更改为诸如importee之类的内容,则显示此错误 AttributeError: 'Resource' object has no attribute 'importee' 看起来和它有关吗?

If I change import to something such as importee then it is showing this error AttributeError: 'Resource' object has no attribute 'importee' So looks like it is related to?

Python保留关键字

Python Reserved Keyword

我还提交了gmail api中的错误,此处是指向 Google问题跟踪器的链接

I have also submitted bug in gmail api here is link to google issue tracker

推荐答案

我发现 cdleary 发出的python#comment115219_77552>评论.解决方法是将_附加到import. service.users().messages().import_()正在工作.虽然我仍然在Google问题追踪器中有未解决的问题.

I found a comment by user cdleary that helped. Work-around is I appended _ to import. service.users().messages().import_() is working. Though still I have issue open in Google issue tracker.

这篇关于gmail python客户端api导入消息显示语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆