Importing Kunena Script fails after creating categories

(Wasim Khamlichi) #1

I’m having a problem running the import script to import Kunena to Discourse. I’m running in a development environment in a vagrant VM. I don’t know Ruby so I don’t really understand what’s going on but I’ve pasted the error below.

There’s tons of pages of stack trace which I won’t bore you with for now but here is the first section. If anyone has any insights I would really appreciate it.

So it imports the users successfully, I’m pretty sure it puts some categories in the DB but I think it fails after that.

[vagrant@precise32:/vagrant (master)]$ bundle exec ruby script/import_scripts/kunena3.rb
You are running an old version of bundler, please upgrade bundler ASAP, if you are using Discourse docker, rebuild your container.
loading existing groups...
loading existing users...
loading existing categories...
loading existing posts...
loading existing topics...
fetching Joomla users data from mysql
fetching Kunena user data from mysql
creating users
       12 / 12 (100.0%)  )
creating topics and posts
/var/lib/gems/2.2.0/gems/rack-mini-profiler- [BUG] Segmentation fault at 0x4d4f524a
ruby 2.2.2p95 (2015-04-13 revision 50295) [i386-linux-gnu]

-- Control frame information -----------------------------------------------
c:0012 p:---- s:0051 e:000050 CFUNC  :each
c:0011 p:0020 s:0048 e:000047 METHOD /var/lib/gems/2.2.0/gems/rack-mini-profiler-
c:0010 p:0054 s:0040 E:00078c METHOD /vagrant/script/import_scripts/base.rb:420
c:0009 p:0071 s:0031 E:000324 BLOCK  script/import_scripts/kunena3.rb:114
c:0008 p:0008 s:0027 e:000026 BLOCK  /vagrant/script/import_scripts/base.rb:702 [FINISH]
c:0007 p:---- s:0025 e:000024 CFUNC  :loop
c:0006 p:0012 s:0022 e:000021 METHOD /vagrant/script/import_scripts/base.rb:701
c:0005 p:0041 s:0017 E:001754 METHOD script/import_scripts/kunena3.rb:92
c:0004 p:0049 s:0012 E:0015c8 METHOD script/import_scripts/kunena3.rb:48
c:0003 p:0029 s:0008 E:0016f8 METHOD /vagrant/script/import_scripts/base.rb:45
c:0002 p:0076 s:0004 E:00062c EVAL   script/import_scripts/kunena3.rb:143 [FINISH]
c:0001 p:0000 s:0002 E:001afc TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
script/import_scripts/kunena3.rb:143:in `<main>'
/vagrant/script/import_scripts/base.rb:45:in `perform'
script/import_scripts/kunena3.rb:48:in `execute'
script/import_scripts/kunena3.rb:92:in `import_posts'
/vagrant/script/import_scripts/base.rb:701:in `batches'
/vagrant/script/import_scripts/base.rb:701:in `loop'
/vagrant/script/import_scripts/base.rb:702:in `block in batches'
script/import_scripts/kunena3.rb:114:in `block in import_posts'
/vagrant/script/import_scripts/base.rb:420:in `create_posts'
/var/lib/gems/2.2.0/gems/rack-mini-profiler- `each'
/var/lib/gems/2.2.0/gems/rack-mini-profiler- `each'

-- Machine register context ------------------------------------------------
  GS: 0x00000033  FS: 0x00000000  ES: 0x0000007b  DS: 0x0000007b EDI: 0x11210110
 ESI: 0x11210110 EBP: 0xbf9f91a8 ESP: 0xbf9f9130 EBX: 0xb6c55540 EDX: 0x4d4f5246
 ECX: 0x20292a28 EAX: 0x11210110 TRA: 0x0000000e ERR: 0x00000004 EIP: 0xb69db69b
  CS: 0x00000073 EFL: 0x00010202 UES: 0xbf9f9130  SS: 0x0000007b

-- C level backtrace information -------------------------------------------
/usr/lib/i386-linux-gnu/ [0xb76d931c]
/usr/lib/i386-linux-gnu/ [0xb76d9593]
/usr/lib/i386-linux-gnu/ [0xb75a2b39]
/usr/lib/i386-linux-gnu/ [0xb7662fac]
/usr/lib/i386-linux-gnu/ [0xb69db69b]
/var/lib/gems/2.2.0/extensions/x86-linux/2.2.0/mysql2-0.4.3/mysql2/ [0xb6cd248b] result.c:160