# Migrating vBulletin 5 database - Import script errors

**URL:** https://meta.discourse.org/t/migrating-vbulletin-5-database-import-script-errors/249495
**Category:** Migration
**Tags:** vbulletin5
**Created:** [December 20, 2022, 5:22pm UTC](https://meta.discourse.org/t/migrating-vbulletin-5-database-import-script-errors/249495 "2022-12-20T17:22:51Z")
**Posts on this page:** 1
**Showing post:** 19

<div class="post-metadata">

### Author: ![Crius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crius/32/317214_2.png) [@Crius](https://meta.discourse.org/u/Crius)
#### Post date: [December 21, 2022, 3:54pm UTC](https://meta.discourse.org/t/migrating-vbulletin-5-database-import-script-errors/249495/19 "2022-12-21T15:54:27Z")

</div>

That’s even weirder as the usernames have been all sanitized to follow discorse guidelines, basically they have all been changed to be letters, numbers or \_, nothing else.

In any case, changing the charset from `utf8mb4` to `utf8` as it was the default made it go through but then I’m getting errors for invalid emails

```plaintext
ERROR: can't modify frozen String: "24ef401b30f5161e5a0bb27ec49ed921@email.invalid"
/var/www/discourse/script/bulk_import/base.rb:457:in `downcase!'
/var/www/discourse/script/bulk_import/base.rb:457:in `process_user_email'
/var/www/discourse/script/bulk_import/base.rb:726:in `block (2 levels) in create_records'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/patches/db/mysql2/alias_method.rb:8:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/patches/db/mysql2/alias_method.rb:8:in `each'
/var/www/discourse/script/bulk_import/base.rb:723:in `block in create_records'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/pg-1.4.5/lib/pg/connection.rb:196:in `copy_data'
/var/www/discourse/script/bulk_import/base.rb:722:in `create_records'
/var/www/discourse/script/bulk_import/base.rb:351:in `create_user_emails'
script/bulk_import/vbulletin5.rb:151:in `import_user_emails'
script/bulk_import/vbulletin5.rb:66:in `execute'
/var/www/discourse/script/bulk_import/base.rb:100:in `run'
script/bulk_import/vbulletin5.rb:781:in `<main>'

```

Going now to discover what is this about as the “non-bulk” imported was detecting some malformed email but replacing them automatically.

---

_[View the full topic](https://meta.discourse.org/t/migrating-vbulletin-5-database-import-script-errors/249495)._
