0

I am consuming Consumption Price Sheet SDK Python and I have an error. It's been running for a long time. In the month of 2020/08 it failed:

'NoneType' object has no attribute 'additional_properties'

Although the API did not have a description of field additional_properties, it came. Now give this error.

The same thing for field "meterdertails.additional_properties".

CODE:

consumption_client.price_sheet.api_version = '2019-10-01'
priceSheetResult = consumption_client.price_sheet.get_by_billing_period(billing_period_name=self.partition_date.replace('-', '')[0:6], expand='properties/meterDetails')

return priceSheetResult

Example correct before ERROR:

{"unit_of_measure": "1 Hour", "billing_period_id": "/subscriptions/.../providers/Microsoft.Billing/billingPeriods/20190601", "offer_id": "MS-AZR-0017P", "unit_price": "2", "included_quantity": "0", "part_number": "AAA", "additional_properties": null, "meter_id": "111111111111111", "currency_code": "EUR", "meter_details": {"meter_name": "NC24", "service_tier": null, "meter_category": "Virtual Machines", "service_name": null, "additional_properties": null, "meter_sub_category": "NC Promo Series Windows", "pretax_standard_rate": null, "total_included_quantity": null, "meter_location": "EU West", "unit": "1 Hour"}}
quamrana
  • 37,849
  • 12
  • 53
  • 71

0 Answers0