Skip to content

Commit

Permalink
Fixing python_validation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JonP-NI committed Dec 7, 2023
1 parent 68fe07f commit 3c4b478
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/grpc-device.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/nirfmxnr/acp-txp-modacc-single-carrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def check_for_warning(response, instrument):
nirfmxnr_types.SelectMeasurementsRequest(
instrument=instr,
selector_string="",
measurements=nirfmxnr_types.MEASUREMENT_TYPES_ACP
measurements_raw=nirfmxnr_types.MEASUREMENT_TYPES_ACP
| nirfmxnr_types.MEASUREMENT_TYPES_MODACC
| nirfmxnr_types.MEASUREMENT_TYPES_TXP,
enable_all_traces=True,
Expand Down Expand Up @@ -450,7 +450,7 @@ def check_for_warning(response, instrument):


except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down
24 changes: 12 additions & 12 deletions examples/nirfmxnr/modacc-noncontiguous-multicarrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def check_for_warning(response, instrument):
instrument=instr,
selector_string=carrier_string,
attribute_id=nirfmxnr_types.NIRFMXNR_ATTRIBUTE_CELL_ID,
attr_val=CELL_ID[i][j],
attr_val_raw=CELL_ID[i][j],
)
)

Expand Down Expand Up @@ -532,34 +532,34 @@ def check_for_warning(response, instrument):

# Fetch results
composite_rms_evm_mean = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
composite_peak_evm_maximum = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
composite_peak_evm_slot_index = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
composite_peak_evm_symbol_index = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
composite_peak_evm_subcarrier_index = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
component_carrier_frequency_error_mean = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
component_carrier_iq_origin_offset_mean = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
component_carrier_iq_gain_imbalance_mean = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
component_carrier_quadrature_error_mean = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]
in_band_emission_margin = [
[None] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
[0.0] * NUMBER_OF_COMPONENT_CARRIERS for i in range(NUMBER_OF_SUBBLOCKS)
]

for i in range(NUMBER_OF_SUBBLOCKS):
Expand Down Expand Up @@ -721,7 +721,7 @@ def check_for_warning(response, instrument):
print("******************************************************************\n")

except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion examples/nirfmxwlan/ofdm-modacc-evm-based-autolevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def check_for_warning(response, instrument):
elif sig_b_crc_status == nirfmxwlan_types.OFDMMODACC_SIG_B_CRC_STATUS_PASS:
print("SIG-B CRC Status : Pass")
except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down
4 changes: 2 additions & 2 deletions examples/nirfmxwlan/ofdm-modacc-txp-composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def check_for_warning(response, instrument):
nirfmxwlan_types.SelectMeasurementsRequest(
instrument=instr,
selector_string="",
measurements=nirfmxwlan_types.MEASUREMENT_TYPES_OFDMMODACC
measurements_raw=nirfmxwlan_types.MEASUREMENT_TYPES_OFDMMODACC
| nirfmxwlan_types.MEASUREMENT_TYPES_TXP,
enable_all_traces=True,
)
Expand Down Expand Up @@ -496,7 +496,7 @@ def check_for_warning(response, instrument):
elif sig_b_crc_status == nirfmxwlan_types.OFDMMODACC_SIG_B_CRC_STATUS_PASS:
print("SIG-B CRC Status : Pass")
except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion examples/nirfmxwlan/sem.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def check_for_warning(response, instrument):
print(f"Margin Absolute Power (dBm) : {upper_offset_margin_absolute_power[i]}")

except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down
2 changes: 1 addition & 1 deletion examples/nirfsg/generate-from-tdms.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def check_for_warning(response, vi):
input()

except grpc.RpcError as rpc_error:
error_message = rpc_error.details()
error_message = str(rpc_error.details() or "")
for entry in rpc_error.trailing_metadata() or []:
if entry.key == "ni-error":
value = entry.value if isinstance(entry.value, str) else entry.value.decode("utf-8")
Expand Down

0 comments on commit 3c4b478

Please sign in to comment.