小编Ari*_*orp的帖子

如何降级protobuf

偶然间我更新了protobuf我的 Ubuntu vps。现在一些非常重要的 Python 脚本不再起作用了。速度其实并不重要。我得到了两个解决方案:

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py 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).
Run Code Online (Sandbox Code Playgroud)

降级protobuf软件包,不确定这就是前进的方向

或者Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python- 但我在哪里设置这个。在Python脚本中?

python protocol-buffers

29
推荐指数
2
解决办法
9万
查看次数

如何使用MailApp在电子邮件中包含内嵌图像

我有一个简单的MailApp来发送HTML格式的文本.我遇到的一个小问题是:如何在该文本中插入内嵌图像?例如,我想为荷兰文本添加荷兰语标志,为法语内容添加法国国旗.

我假设只使用HTML代码就可以完成这项工作.但是,唉,没有这样的运气.这只是我需要的一个小图像,内容下面没有大图像.我怎么能做到这一点?

MailApp.sendEmail(mailaddress, subject, "" ,
              { htmlBody: bodyNL + bodyFR })
Run Code Online (Sandbox Code Playgroud)

email gmail inline-images google-apps-script

7
推荐指数
1
解决办法
9778
查看次数