Problem with import script ipboard3.rb

I’m trying to import data from my ipb forum and running script ipboard3 gives me the following error:

script/import_scripts/ipboard3.rb:375:in `clean_up': undefined method `encode!' for nil:NilClass (NoMethodError)
root@forum:/var/www/discourse#  `clean_up': undefined method `encode!'

Why is it giving undefined method ‘encode!’ :confused:

Because it’s getting called with raw being nil.

So you’ll need to figure out which function is calling it and why it’s not getting data for the raw data for the post.

My guess is this line:

           bio_raw: clean_up(u["pp_about_me"]),

If that’s the case, then maybe what to do is modify clean_up so that it’ll return nil if it gets no data.


is this good?


I tried this and it did import all users and topics and posts but posts have no body (they’re empty) got any idea why? I don’t think adding “return nil” would make much difference, what do you think?
also all personal messages got imported but they’re empty too

The database query is wrong for some reason. It’s not getting the data for the post content.

No, that’ll trigger way too often. Try this:

return if raw.nil?


That’s weird because I’m using IPB3 and I checked the column names and they match :open_mouth:

If you do the queries that the script is doing, do they provide the data that you expect?

Did you change your


to something like

if raw.length == 0

"randome text" will always be true.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.