Error -1074097882 When Using the RFmx Python API and Loading an S2P File

Updated May 5, 2026

Reported In

Software

  • RFmx

Programming Language

  • Python

Issue Details

I am attempting to load an S-Parameter external attenuation table from an S2P file using the RFmx Python API, but I am getting error -1074097882 about setting the reference level to an invalid value as shown below. 

 

 

Why am I getting this error after loading the S2P file and configuring a higher reference level using the Python API when it works just fine through InstrumentStudio or using the LabVIEW API? 

Solution

When using the RFmx Python API and calling the load_s_parameter_external_attenuation_table_from_s2p_file function to load and store the S-Parameter table from the S2P file for de-embedding, you must first commit the scalar de-embedding factors to the instrument before attempting to set your reference level to a higher value than what is normally allowed.

 

During your instrument session configuration, you will first call the load_s_parameter_external_attenuation_table_from_s2p_file and then call the RFmx SpecAn Commit function (or which ever RFmx personality is being used). Once you have committed the scalar de-embedding factors to the hardware, then you can call the configure_reference_level function to set your desired reference level. 

 

As an example, the following code snippet is a minor edit of the example from the RFmx SpecAn Python API Documentation. This snippet shows loading the external attenuation table from an S2P file, committing the instrument settings, then configuring the reference level before initiating the measurement. 

 

 

Additional Information

Loading the scalar de-embedding factors is a property of the instrument/hardware, which is why they are set using the RFmx Instr API. In RFmx, configuring any instrument property does not directly set that value on the hardware until you commit those settings using the RFmx Commit or Initiate APIs. In the case of loading the external attenuation table, you will need to load and commit the table to the hardware first so that the instrument can determine the new max range for the reference level.