Bug in wekaPython
Steffen Herbold <[email protected]>
| Newsgroups | gmane.comp.ai.weka |
|---|---|
| Message-ID | <[email protected]> |
Dear Devs,
I think I found a bug in wekaPython. It seems like the py-path parameter
is not always used as it should by the PythonServer.
I encountered the problem in a batch system, in which I did not have the
GUI and, therefore, did not use the package manager. Here is the
problematic code:
private void launchServer(boolean startPython) throws IOException {
Thread acceptThread = startServerSocket();
int localPort = m_serverSocket.getLocalPort();
if (startPython) {
String serverScript =
WekaPackageManager.PACKAGES_DIR.getAbsolutePath()
+ File.separator + "wekaPython" + File.separator + "resources"
+ File.separator + "py" + File.separator + "pyServer.py";
ProcessBuilder processBuilder = new ProcessBuilder(m_pythonCommand,
serverScript, "" + localPort, m_debug ? "debug" : "");
m_serverProcess = processBuilder.start();
}
try {
acceptThread.join();
} catch (InterruptedException e) {
}
checkLocalSocketAndCreateShutdownHook();
}
The serverScript String ignores the py-path, which results in failures
because the server cannot be started if there is no packages folder with
the required ~/wekaPython/resources/py/* files.
Best,
Steffen
--
PD Dr. Steffen Herbold
Institute of Computer Science, University of Goettingen
Goldschmidtstraße 7, 37077 Göttingen, Germany
mailto. [email protected]
tel. +49 551 39-172037
_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html