Re: Bug in wekaPython

Mark Hall <[email protected]>
Newsgroups gmane.comp.ai.weka
Message-ID <30ee56c9-3c7f-40ea-9c6b-1eefdac5e28f@Spark>
Hi Steffen,

I’m not too sure I understand the problem. The package (and the server) cannot be used unless the package is installed by Weka’s package manager.

Cheers,
Mark.
On 9 Jun 2021, 4:04 AM +1200, Steffen Herbold <[email protected]>, wrote:
> 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

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.