简体   繁体   English

脚本测试似乎没有正确的工作目录

[英]Script test seems to not have correct working directory

I am trying to see if I can get code examples to run in my user account, rather than the testuser account. 我正在尝试查看是否可以在我的用户帐户而不是testuser帐户中运行代码示例。 To that end, I did the following: 为此,我做了以下工作:

When I do, I get the error: 当我这样做时,我得到了错误:

Connecting to 172.31.232.190:8000
3:53:26 PM Stream Connect matthew.pettis connection established, waiting for an event...
> require(deployrUtils)
> deployrInput("{\"name\": \"bal\", \"render\":\"integer\", \"default\": 5000, \"min\" : 0, \"max\": 25000 }")
> deployrInput("{\"name\": \"trans\", \"render\":\"integer\", \"default\": 12, \"min\" : 0, \"max\": 100 }")
> deployrInput("{\"name\": \"credit\", \"render\":\"integer\", \"default\": 8, \"min\" : 0, \"max\": 75 }")
> if (!exists("fraudModel")) {
+ load("fraudModel.rData")
Console Error cannot open the connection
API Error cannot open the connection

I tried following the post here to troubleshoot, but I could not find where my directory was: deployR cannot open the connection 我尝试按照此处的帖子进行故障排除,但找不到目录所在的位置: deployR无法打开连接

When I used the script to look for the working directory (and list contents), I see: 当我使用脚本查找工作目录(和列表内容)时,我看到:

> require(deployrUtils)
> getwd()
[1] "C:/PROGRA~1/MICROS~2/DEPLOY~1.0/rserve/workdir/conn2209460"
> list.files(getwd())
[1] "DeployREngineSource.r" "unnamedplot001.png"

This seems like the wrong directory to be using. 这似乎是使用错误的目录。 When I try to hunt around for my directory for my user, I can't seem to find it. 当我尝试为用户寻找目录时,似乎找不到它。 My DeployR version is 8.0.0. 我的DeployR版本是8.0.0。

Help is appreciated. 感谢帮助。

Thanks, Matt 谢谢,马特

Is that the remote directory (the second box)? 那是远程目录(第二个方框)吗? If so, why don't you call setwd() ? 如果是这样,为什么不调用setwd()呢?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM