pypmml
pypmml copied to clipboard
pypmml.base.PmmlError: ('FileNotFoundException',
When I call the pmml file with pypmml across folders, this error always occurs when loading the model (the error is as follows), I try to modify the java version (the original is 1.7, modified to 1.8), the same situation still occurs
The path passed must be correct
Hope that fixes this
Traceback (most recent call last):
File "E:\python_virtual_env\com_work\lib\site-packages\pypmml\model.py", line 192, in fromFile
java_model = pc._jvm.org.pmml4s.model.Model.fromFile(name)
File "E:\python_virtual_env\com_work\lib\site-packages\py4j\java_gateway.py", line 1322, in call
return_value = get_return_value(
File "E:\python_virtual_env\com_work\lib\site-packages\py4j\protocol.py", line 326, in get_return_value
raise Py4JJavaError(
py4j.protocol.Py4JJavaError: An error occurred while calling z:org.pmml4s.model.Model.fromFile.
: java.io.FileNotFoundException: E:\python_virtual_env\com_work\SchedulerSystem\algorithmZoo\pmml_file\DecisionTreeIris.pmml (系统找不到指定的路径。)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/python_virtual_env/com_work/SchedulerSystem/algorithmZoo/iris_desicion_tree.py", line 7, in
@oslijw Could you make sure the following file exists?
E:\python_virtual_env\com_work\SchedulerSystem\algorithmZoo\pmml_file\DecisionTreeIris.pmml
You can use the Java code to verify, for example:
FileInputStream fis = new FileInputStream(new File(fileName));
@oslijw Can we close the issue? Please let me know if you have any issues.
@scorebot i have the file in local file system, but it still no work
@oslijw Can the file pathname be opened by the code FileInputStream fis = new FileInputStream(new File(fileName));
?
actually i code by python I will try java for your advice
i unuse pmml now,maybe i will use late