Sorry, you may have sorted this by now.Been away for the weekend and only just seen the original post.
Do you have an owner's manual? If you do then the procedure for closing the roof manually is in there towards the back of the booklet. It involves a tool that should be in your boot, basically a size 6 Allen Key which you use to relieve the hydraulic pressure in the unit below the spare wheel. You will need a friend to help out in order to keep everything even and balanced as you do it. If you haven't got a manual download one. Just google 'owners manual 207cc' and sites will come up.
Once you've closed the roof manually restore the hydraulic pressure (instructions in the manual) and attempt to open the roof. If it opens ok then close it. If it completes both manoeuvres you've had a glitch and it may never happen again although you might still want to have it checked out. If it stops during opening or closing then there probably is a mechanical fault and you don't have much choice but to get it sorted by a dealership or Peugeot specialist.
You say you are getting a message that the roof is not completely closed. Is it physically not fully closed? Can you tell it's not fully closed? If it looks shut and even all around it could be a software problem.