Yes, I get that error too, I think it’s because my earlier suggestion to add u.user_profile = UserProfile.new was in fact incorrect. When I run the script with your sample CSV and without that line (so I run the script as it was originally), I don’t encounter any errors and your user is just imported as it should.
Hello @vindia, i’m trying your script as @alehman. it turns out that it’s not working, i’m getting the same error as posted on this thread. Do you have any light?
I would love to help out, but since I wrote the script a lot of things have changed in the Discourse database structure. I’m not using Discourse anymore so I’ve got no real way of testing or updating my script to this new structure.