orbitalimpact / hipmost

Migrate your Hipchat history to Mattermost
MIT License
10 stars 5 forks source link

post.rb : wrong number of arguments (given 2, expected 3) (ArgumentError) #8

Open EdHarkin opened 5 years ago

EdHarkin commented 5 years ago

Hi, I'm receiving this error when I try convert a room:

/usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/hipchat/post.rb:8:in `initialize': wrong number of arguments (given 2, expected 3) (ArgumentError)''

Any suggestions?

Thank you

ylluminarious commented 5 years ago

@EdHarkin Sorry for the delay. Would you mind posting more output from the error? I think you're just posting the last line.

EdHarkin commented 5 years ago

Thanks for replying @ylluminarious. Here is the full output:

`me@iMac~ $ hipmost -v rooms import “Room” “team”:”general" Parsing rooms for Hipchat and Mattermost... Hipchat room is: Room Mattermost team & channel are: team:general Successfully parsed rooms

Opening /Users/me/Room.jsonl for writing... Writing version header... Writing team info... Writing channel info... Writing room members... Traceback (most recent call last): 11: from /usr/local/bin/hipmost:23:in <main>' 10: from /usr/local/bin/hipmost:23:inload' 9: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/exe/hipmost:48:in <top (required)>' 8: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost.rb:14:inrun' 7: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:23:in run' 6: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:47:inimport' 5: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:54:in save' 4: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:54:inopen' 3: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:64:in block in save' 2: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:64:ineach' 1: from /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:65:in block (2 levels) in save' /usr/local/lib/ruby/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/hipchat/room.rb:46:inusers': undefined method []' for nil:NilClass (NoMethodError)

ylluminarious commented 5 years ago

@EdHarkin Hmm, it seems that you're posting two different errors. The first one that you gave is different from this most recent one. The latter is also somewhat hard to decipher because it sounds like your room doesn't have any users, which shouldn't happen as far as I remember. But it sounds like a case where some sample data would be useful. Again, it's also different from your first error so I'm not quite sure what the root(s) of your problem(s) is / are.

Also, you should probably read up on Github's markdown formatting because your comment is a little hard to read.

bhoover19 commented 5 years ago

I am getting this error as well.

command run - hipmost public import "Fantasy Football" "Fantasy Football":"General" - path /usr/local/data

error - /var/lib/gems/2.5.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:62:in 'block (3 levels) in save': undefined method 'to_jsonl' for nil:NilClass (NoMethodError). Did you mean? to_json

developerrespig commented 5 years ago

Actually I got the ArgumentError and I don't know how to fix it. Here is the command that I execute:

hipmost -v public import "testroom" "migration":"testroom"

The Output: Parsing rooms for Hipchat and Mattermost... Hipchat room is: testroom Mattermost team & channel are: migration:testroom Successfully parsed rooms

Opening /home/xxx/tmp/testroom.jsonl for writing... Writing version header... Writing team info... Writing channel info... Writing room members... Writing room posts (newest to oldest)... On room 1 /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/hipchat/post.rb:8:in initialize': wrong number of arguments (given 2, expected 3) (ArgumentError) from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/hipchat/post_repository.rb:33:innew' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/hipchat/post_repository.rb:33:in block in load' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/hipchat/post_repository.rb:27:ineach' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/hipchat/post_repository.rb:27:in load' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:76:intap' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:76:in block (2 levels) in save' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:70:ineach' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:70:in block in save' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:50:inopen' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:50:in save' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:43:inimport' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost/cmds/room.rb:19:in run' from /var/lib/gems/2.3.0/gems/hipmost-1.0/lib/hipmost.rb:12:inrun' from /var/lib/gems/2.3.0/gems/hipmost-1.0/exe/hipmost:48:in <top (required)>' from /usr/local/bin/hipmost:22:inload' from /usr/local/bin/hipmost:22:in `

'

Can anyone help me with this?