错误是:调用非函数("模块"对象)



我使用JES在这个特定项目中被困,是的,我宁愿被眼睛戳。同时,我遇到了这个有趣的问题,我无法将我的Python包装加载到Jes中。有人告诉我,这种策略会起作用。当我对所有JES函数进行虚拟定义,然后在Pycharm中运行项目时,一切都可以"很好"(鉴于虚拟函数的预期行为(。我无法弄清楚Jes发生了什么事。

有人在Jes中加载自定义Python软件包的经验?

项目结构

Project
  main.py
  MyPackage
     __init__.py
     allmygoodies

main.py

""" getMediaPath() and setMediaPath() are built in JES functions """ 
import sys
setMediaPath() # Setting it to project root
sys.path.append(getMediaPath()) # Appending Project Root
sys.path.append(getMediaPath() + "MyPackage") # Also tried this
from MyPackage import * # Importing everything from package
myObject = MyObject()

错误

The error was:call of non-function ('module' object)
Inappropriate argument type.
An attempt was made to call a function with a parameter of an invalid type. This means that you did something such as trying to pass a string to a method that is expecting an integer.

为了实现这一目标,我必须切换到JES 5 。我以前使用的是JES 4,它不支持此功能。

相关内容

  • 没有找到相关文章

最新更新