Error de importación de Q2a

Estoy usando el script de [esta importación de q2a](https://gist.github.com/[Communiteq](https://www.communiteq.com) (anteriormente DiscourseHosting)/769eff2014d5482f0ab776de03dc3349) y veo el siguiente error. Por favor, ayúdame a solucionar este problema.

¿Es un problema con mi base de usuarios o con el script? ¿Cómo lo arreglo? ¡Gracias!

Cargando grupos existentes...
Cargando usuarios existentes...
Cargando categorías existentes...
Cargando publicaciones existentes...
Cargando temas existentes...

importando usuarios
       80 / 447 ( 17.9%)  [208 elementos/min]  Rastreo (última llamada primero):
	12: desde script/import_scripts/question2answer.rb:601:in `<main>'
	11: desde /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
	10: desde script/import_scripts/question2answer.rb:70:in `execute'
	 9: desde script/import_scripts/question2answer.rb:89:in `import_users'
	 8: desde /var/www/discourse/script/import_scripts/base.rb:877:in `batches'
	 7: desde /var/www/discourse/script/import_scripts/base.rb:877:in `loop'
	 6: desde /var/www/discourse/script/import_scripts/base.rb:878:in `block in batches'
	 5: desde script/import_scripts/question2answer.rb:106:in `block in import_users'
	 4: desde /var/www/discourse/script/import_scripts/base.rb:247:in `create_users'
	 3: desde /var/www/discourse/script/import_scripts/base.rb:247:in `each'
	 2: desde /var/www/discourse/script/import_scripts/base.rb:259:in `block in create_users'
	 1: desde /var/www/discourse/script/import_scripts/base.rb:290:in `create_user'
/var/www/discourse/script/import_scripts/base.rb:393:in `find_existing_user': método `downcase' no definido para nil:NilClass (NoMethodError)

It looks like discourse/script/import_scripts/question2answer.rb at main · discourse/discourse · GitHub was updated more recently. (Oh, but it doesn’t import passwords).

Some field is empty or missing and shouldn’t be. You can try adding a put statement at line 111 printing out the user data and see if any of those fields are empty. And if they are, then you figure out why.

@pfaffman Thank you for the quick reply. appreciate your help.

official q2a import script never worked for me even for other q2a sites. Your script works well.

If some field is missing or empty, I’m Ok to not import that users, please let me know how to do that. which code line to modify.

btw, I’m not good at coding :frowning: I will just follow your instructions to modify code.
Thanks!

That’s beyond the scope of what can be done here. If you need more help, please see Discourse Migration — Literate Computing, LLC and let me know your needs.

@pfaffman I tired below solution at line 111 and it worked. Do you see issue with this code? I’m planning to delete all users with below email id/username after import.

Thanks again for your help!

        if !username
            username = "userempty"
        end

        if !email
            email = "test@example.com"
        end

        puts "username: #{username}"
        puts "email: #{email}"