Trouble creating category in import script

I got this problem too. I’ve been working with vbulletin import script. I have changes for importing users and attachments. All my changes were working; I’ve done complete runs. Then I did some refactoring relating to user import and now I have this problem.
I am using docker with the standalone configuration (postgres running on a separate server). Between runs and tests, I would drop the database with psql and use ‘rake db:migrate’.