Pymol-Scripts / Pymol-script-repo

Collected scripts for Pymol
http://www.pymolwiki.org/index.php/Git_intro
435 stars 257 forks source link

OSError Running Autodock Plugin #130

Closed lalithroopesh closed 5 months ago

lalithroopesh commented 1 year ago

Generating receptors throws the following error:

Error: 2
OSError Exception in Tk callback
  Function: <bound method Autodock.generate_receptor of <pmg_tk.startup.autodock_plugin.Autodock object at 0x0000023B982C6CC8>> (type: <class 'method'>)
  Args: ()
Traceback (innermost last):
  File "C:\Users\lalit\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\Pmw.py", line 1823, in __call__
    return self.func(*args)
  File "C:\Users\lalit\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\autodock_plugin.py", line 1940, in generate_receptor
    result, output = getstatusoutput(command)
  File "C:\Users\lalit\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\autodock_plugin.py", line 85, in getstatusoutput
    p = Popen(args, stdout=PIPE, stderr=STDOUT, stdin=PIPE, env=env)
  File "C:\Users\lalit\AppData\Local\Schrodinger\PyMOL2\lib\subprocess.py", line 804, in __init__
    restore_signals, start_new_session)
  File "C:\Users\lalit\AppData\Local\Schrodinger\PyMOL2\lib\subprocess.py", line 1211, in _execute_child
    startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application

Not sure what specifically isn't being read as an application or how to fix it. I have tried setting "USE_SYS_EXECUTABLE" to True and even manually editing to add "python.exe" before .py commands in the plugin in case that is the issue but it did not make any change.

wadx2019 commented 1 year ago

I have also encountered this problem. Have you solved it?

lalithroopesh commented 1 year ago

I poked around and got somewhat closer, but generating PDBQTs via MGLtools was just faster for my project.

wadx2019 commented 1 year ago

I poked around and got somewhat closer, but generating PDBQTs via MGLtools was just faster for my project.

I spent one day figuring out the program and fixed the bug by introducing an extra python_exe path in the config page. You can find it in pull request #135.