The reason is that the ipython magic calls the same code for parsing the magic arguments. It's very odd that you're getting these errors which didn't occur for me. Is this python3 by any chance?