gpt4 book ai didi

python - gmailR错误 "Only AF_INET sockets are currently supported on jython"

转载 作者:行者123 更新时间:2023-12-01 04:29:33 24 4
gpt4 key购买 nike

我一直在 R 中使用 gmailR 从 R 发送电子邮件,没有出现任何问题,但自一周以来它一直出现故障。有时它有效,但大多数时候无效。顺便说一句,这是来自 github 的 Trinker 包(而不是 CRAN gmailr!):https://github.com/trinker/gmailR

这是我的脚本:

library(gmailR)
chartime <- as.character(Sys.time())
email_test <- function(chartime){
gmail("sjorsvanheuveln@gmail.com", password="************", subject = "Test No New Projects",
message = paste("Testing time at",chartime), from = "sjorsvanheuveln@gmail.com",
attachment = NULL, server = "smtp.gmail.com:587", username = "sjorsvanheuveln@gmail.com",
confirmBeforeSend = FALSE, clear.username = FALSE)}
email_test(chartime)

这是错误:

Error in jython.exec(rJython, mail) : 
Only AF_INET sockets are currently supported on jython
7 stop(python.exception)
6 jython.exec(rJython, mail)
5 email.helper(to = list(to[i]), from = list(from), subject = subject,
message = message, attachment = atts[[i]], username = username,
password = password, server = server, confirmBeforeSend = confirmBeforeSend)
4 FUN(1L[[1L]], ...)
3 lapply(seq_along(to), function(i) {
email.helper(to = list(to[i]), from = list(from), subject = subject,
message = message, attachment = atts[[i]], username = username,
password = password, server = server, confirmBeforeSend = confirmBeforeSend) ...
2 gmail("sjorsvanheuveln@gmail.com", password = "**********", subject = "Test No New Projects",
message = paste("Testing time at", chartime), from = "sjorsvanheuveln@gmail.com",
attachment = NULL, server = "smtp.gmail.com:587", username = "sjorsvanheuveln@gmail.com",
confirmBeforeSend = FALSE, clear.username = FALSE)
1 email_test(chartime)

这是我的 session 信息:

   R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] nl_NL.UTF-8/nl_NL.UTF-8/nl_NL.UTF-8/C/nl_NL.UTF-8/nl_NL.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gmailR_1.0 rJython_0.0-4 rjson_0.2.15 rJava_0.9-7

loaded via a namespace (and not attached):
[1] tools_3.1.3 XML_3.98-1.3

我该如何解决这个问题?

最佳答案

不支持 AF_INET6 已修复 Jython 2.5.2,请参阅 http://bugs.jython.org/issue1210 (您的问题出现在不同的路由器上这一事实非常表明它是 IPv4 与 IPv6 的问题。)但是,rJython 捆绑了旧版本的 Jython jar。也许可以升级,即使不升级到 2.7?

为此联系 rJython 包的维护者可能是值得的。

关于python - gmailR错误 "Only AF_INET sockets are currently supported on jython",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32569546/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com