传入的位置无效,必须提供绝对路径?

传入的位置无效,必须提供绝对路径?

我正在尝试为 Redhawk 运行一个 Python 沙盒示例(https://redhawksdr.github.io/Documentation/mainch3.html#x5-270003.3)。我可以从 /usr/local/redhawk/ide/2.1.2 文件夹 (./eclipse) 启动 REDHAWK IDE。但是,当我运行以下命令时,出现错误:

>>> sb.IDELocation("/usr/local/redhawk/ide/2.1.2/eclipse")
IDELocation(): ERROR - invalid location passed in, must give absolute path 
/usr/local/redhawk/ide/2.1.2/eclipse

如果我忽略这个“IDELocation(): ERROR”,执行 Plot() 命令时会出现以下问题:

>>> sb.IDELocation("/usr/local/redhawk/ide/2.1.2/eclipse")
IDELocation(): ERROR - invalid location passed in, must give absolute path 
/usr/local/redhawk/ide/2.1.2/eclipse
>>> plot = sb.Plot()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/redhawk/core/lib/python/ossie/utils/sb/io_helpers.py", 
    line 1985, in __init__
    raise AssertionError, "Plot():__init__() ERROR - must set environment 
    variable RH_IDE or call IDELocation()"
AssertionError: Plot():__init__() ERROR - must set environment variable 
   RH_IDE or call IDELocation()

有人知道如何解决此问题吗?提前致谢!

答案1

检查GITHub 源文件对于错误

IDELocation():错误 - 传入的位置无效,必须提供绝对路径

揭示如果在传入的绝对路径中找不到 eclipse,则会返回上述错误。因此,在您的情况下调用该函数的正确方法是:

sb.IDELocation("/usr/local/redhawk/ide/2.1.2/")

相关内容