首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gmailR错误“jython当前仅支持AF_INET套接字”

gmailR错误“jython当前仅支持AF_INET套接字”
EN

Stack Overflow用户
提问于 2015-09-15 00:26:58
回答 1查看 156关注 0票数 1

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

这是我的脚本:

代码语言:javascript
复制
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)

下面是错误:

代码语言:javascript
复制
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) 

这是我的会话信息:

代码语言:javascript
复制
   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

我该如何解决这个问题呢?

EN

回答 1

Stack Overflow用户

发布于 2015-09-18 12:20:37

Jython2.5.2修复了不支持AF_INET6的问题,请参阅http://bugs.jython.org/issue1210 (你的问题出现在不同的路由器上,这很大程度上表明这是IPv4对IPv6的问题)。但是,rJython捆绑了一个旧版本的Jython jar。也许这个可以升级,即使不能升级到2.7?

为了做到这一点,联系rJython包的维护者可能是值得的。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32569546

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档