A type error is a very general error, meaning it could be any number of issues.
The best place to start would be to confirm what arguments you are passing to .Q.hdpf and that each of the parameters are of the correct type as per .Q.hdpf
Thanks for sharing your question on the KX Community!
Hope this helps,
Tel: +44 (0)28 3025 2242
Tel: +1 (212) 447 6700
Tel: +61 (0)2 9236 5700