Flarum to Discourse Migration Script

I found the problem. In my case one post has multiple tags. After I deleted such posts import script processed without any error.