Just to let you know that I have found out what was causing the error and it was something as simple as I had no content inserted into the custom post types which is why it was not displaying the associated custo fields!
Feeling a little bit silly now!