简体   繁体   English

使用 Octave GUI 命令窗口执行 .m 文件会导致错误:没有这样的文件

[英]Executing .m file with Octave GUI command window leads to error: no such file

I'm pretty new to working with Octave (v 6.1.0) and could not figure out what's the problem with executing a .m-file via command window yet.我对使用 Octave (v 6.1.0) 还很陌生,还无法弄清楚通过命令窗口执行 .m 文件有什么问题。

Octave is installed locally on my computer. Octave 本地安装在我的电脑上。

My working directory is in subdirectory on a server.我的工作目录位于服务器上的子目录中。 The hierarchy of that server is like:该服务器的层次结构如下:

Server:/access/access/no_access/no_access/access/my_working_directory服务器:/access/access/no_access/no_access/access/my_working_directory

With octave I can open and edit the scripts in my_working_directory .使用八度,我可以打开和编辑my_working_directory 中的脚本。

Using the pwd command in the octave command window also returns: Server:/access/access/no_access/no_access/access/my_working_directory在八度命令窗口中使用pwd命令也会返回: Server:/access/access/no_access/no_access/access/my_working_directory

When i want to execute the .m script I receive an error like: error: no such file 'server:\\access\\access\\file2execute.m当我想执行 .m 脚本时,我收到如下错误: error: no such file 'server:\\access\\access\\file2execute.m

It seems like a path for the ocatve command tool is not set correctly, therefore it's searching in the wrong folder for the script.似乎 ocatve 命令工具的路径设置不正确,因此它在错误的文件夹中搜索脚本。

Seems like Octave has problems with a path including spaces like:似乎 Octave 的路径有问题,包括以下空格:

Server:/access/access/no_access/no access folder/access/my_working_directory服务器:/access/access/no_access/no access folder/access/my_working_directory

If it's not possible to change the folder's name, you can mount the "my_working_directory" folder as a new drive of your computer (win explorer > computer > map network drive).如果无法更改文件夹名称,则可以将“my_working_directory”文件夹挂载为计算机的新驱动器(win explorer > computer > map network drive)。

After that, open Octave again and change the working directory using the new path with the mounted folder.之后,再次打开 Octave 并使用安装文件夹的新路径更改工作目录。 This worked for me.这对我有用。

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

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