Python Scripting Error

ZAM
ZAM New Altair Community Member
edited November 2024 in Community Q&A
Hello 
I am getting the following error when I test my python scripting binaries and when I try and use the Execute Python block, any help would be appreciated.

  • Exception: java.nio.file.InvalidPathException
  • Message: Illegal char <"> at index 0: "C:\Program Files\Python37\python.exe"
  • Stack trace:
  • sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
  • sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
  • sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
  • sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
  • sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
  • java.nio.file.Paths.get(Paths.java:84)
  • com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.quotePath(PythonSetupTester.java:271)
  • com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.getFullPathForPythonBinary(PythonSetupTester.java:766)
  • com.rapidminer.extension.pythonscripting.PluginInitPythonScripting.getDefaultPythonBinary(PluginInitPythonScripting.java:368)
  • com.rapidminer.extension.pythonscripting.PluginInitPythonScripting$3.informParameterSaved(PluginInitPythonScripting.java:313)
  • com.rapidminer.tools.ParameterService.informListenerOfSave(ParameterService.java:492)
  • com.rapidminer.tools.ParameterService.saveParameters(ParameterService.java:389)
  • com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.saveList(PythonSetupTester.java:454)
  • com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.forceRefreshPythonBinaries(PythonSetupTester.java:753)
  • com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.listPythonBinaries(PythonSetupTester.java:494)
  • com.rapidminer.extension.pythonscripting.operator.scripting.python.PythonSetupTester.refreshPythonBinariesCache(PythonSetupTester.java:216)
  • com.rapidminer.extension.pythonscripting.parameter.PythonBinariesSuggestionProvider.runRefreshOperation(PythonBinariesSuggestionProvider.java:40)
  • com.rapidminer.extension.pythonscripting.parameter.AbstractEnvironmentSuggestionProvider$RefreshAction$1.run(AbstractEnvironmentSuggestionProvider.java:75)
  • com.rapidminer.gui.tools.ProgressThread$3.run(ProgressThread.java:561)
  • java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  • java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  • java.lang.Thread.run(Thread.java:748) 
Thanks.
ZAM

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • varunm1
    varunm1 New Altair Community Member
    Answer ✓
    I saw this earlier with @Selim The issue is with spaces in path names. I recommend you install Anaconda with a new environment dedicated to rapidminer that have Python 3.5. This solved a similar error.

Answers

  • hughesfleming68
    hughesfleming68 New Altair Community Member
    edited April 2019
    • Exception: java.nio.file.InvalidPathException. Hello Zam, does your Python installation pass the test in Settings-> Preferences-> Python scripting? This looks like a path problem. Most problems come from paths or not pointing to a correct Python environment.
  • IngoRM
    IngoRM New Altair Community Member
    In particular it looks like the path contains a quote symbol (") which seems to be the problem?  I would try without them...
  • varunm1
    varunm1 New Altair Community Member
    Answer ✓
    I saw this earlier with @Selim The issue is with spaces in path names. I recommend you install Anaconda with a new environment dedicated to rapidminer that have Python 3.5. This solved a similar error.
  • ZAM
    ZAM New Altair Community Member

    @IngoRM There is no (") in the path i double checked it, and tried Python 3.7, 3.6, 3.5.
    all of them not working for the Python Scripting Block
  • ZAM
    ZAM New Altair Community Member
    @varunm1 i double checked the path name, there is no spaces in the name.
    However i created a new Environment in Anaconda Dedicated to RapidMiner with 3.5 Python and its working now.
    Thanks.


Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.