Mass Hunter SDK

Try to run the quant debug tools using following code, but keep having the error. I am using VS studio 2019 and ironPython 2.7, installed the SDK from Quant B09.00


import clr
import sys

import System

# append quant path
# modify path if necessary
"C:\\Program Files\\Agilent\\MassHunter\\Workstation\\Quant\\bin")

# add debug dll path

# load debug tool

import Agilent

# run



ERROR: TypeError: RunQuant() takes exactly 2 arguments (1 given)


  • Hello

    I apologize for the extremely delayed response. I was going through old posts and found that this one had never been replied to. 


    Here are a few things to do that should allow you to run the shipping Quant debugging script successfully.


    The most important is to use the supported and tested versions of Visual Studio and IronPython as listed in the Scripting Developer’s Guide. From my limited testing I have found that the IronPython version is critical. IronPython version 2.7.5 is a must, though it can be difficult to find. I found an archived version of the older builds available on the IronPython GitHub site in their archived Main repository. It is a read only archive and contains a Windows installer for version 2.7.5 among others. The main listing of available builds can be found at this link



    Next, I would suggest using Visual Studio 2015. While I have been able to get the debugging script to run in Visual Studio 2019 I can’t say how successful you may be once you go beyond that basic script. Again, it is not easy to find the older versions, but they are still available. Go to the main Visual Studio page and log in with your Microsoft account.



    Once you get to your Visual Studio Subscriptions page go to the Downloads section to access older versions.


    If you are using Visual Studio 2015 you don’t need to download the Python tools separately. When installing VS 2015 choose to perform a custom install, expand the section for Programming Languages and choose Python Tools for Visual Studio.


    Finally, for your specific example, the final line of code should read.




    The shipping solution DebugPythonQuantScripting-VS2013.sln should be correct and will open and work in VS 2015. When run, this will launch a debug version of Quant where you can call your scripts for testing and further debugging.  


    Currently there is no timeline for the implementation of the latest versions of Visual Studio and IronPython with the Quant SDK, so for now I would recommend sticking with the versions suggested in the manual.

  • Hello ,

    Where can I locate the Scripting Developer’s Guide?



  • Hi ,


    Starting with Quant B.08.x There is a folder named SDK on the installation media that contains an installer. After the SDK has been installed there will be a Start menu item called Quantitative Analysis SDK that opens a folder that contains shortcuts to all of the documentation. 


Was this helpful?