XeroAPI / xero-python-oauth2-app

python app for demonstrating the xero-python SDK
MIT License
19 stars 31 forks source link

ValueError: PayrollNZ Read (all) Emp Salary & Wages #42

Open ChocolateyShatner opened 2 years ago

ChocolateyShatner commented 2 years ago

Hi, I have cloned this repo, and trying to Read (all) Emp Salary & Wages from PayrollNZ.

Its coming up as an Internal Server Error and the terminal shows

ValueError: Invalid value for annual_salary, must not be None

I have not made any changes, is there anything I need to do? I can access other PayrollNZ information as well as accounting info. But Salary and wages is what I really need.

Any help would be very much appreciated, CS

leegough commented 2 years ago

Hey @ChocolateyShatner thank you for raising the issue. Can I ask whether you are you using demo company or real world data to arrive at the error?

ChocolateyShatner commented 2 years ago

Hi, I am using the DemoCompany. Seems that when I comment out the code in the class that generated the ValueError, the Read (all) Emp Salary & Wages call now works fine. Might this cause issues later?

RettBehrens commented 1 year ago

Digging into this and it seems that the demo company has an hourly employee with the annual salary field set to null in the API response. Will need to check with the API team whether that should be a number even if the number is 0