mark2devel / mark2

Minecraft Multi Server Wrapper Written in Python with Twisted; Pull Requests HIGHLY Encouraged, Collaborators Needed Discord: https://discord.gg/zymJygHNpv
Other
208 stars 44 forks source link

Cannot Attach to running server #14

Closed TomLewis closed 9 years ago

TomLewis commented 9 years ago

I just configured my first VPS, setup everything, got mark2 start a server (I can see it in my server list) But right at the very last step, I cant attach to the running servers console! I can't believe I got this far and it broke, I followed everything in the INSTALL.md & USAGE.md.

This is the error I get in my console:

tom@piratecraft:~/piratecraft/games$ mark2 attach games
Traceback (most recent call last):
  File "/usr/bin/mark2", line 6, in <module>
    sys.exit(main())
  File "/usr/mark2/mk2/launcher.py", line 611, in main
    command.start()
  File "/usr/mark2/mk2/launcher.py", line 126, in start
    self.run()
  File "/usr/mark2/mk2/launcher.py", line 506, in run
    f = user_client.UserClientFactory(self.server_name, self.shared_path)
  File "/usr/mark2/mk2/user_client.py", line 456, in __init__
    self.ui = UI(self.config.get_palette(), self.get_players, self.run_command, self.switch_server, self.connect_to_server, self.config.get_player_actions(), self.config.get_player_reasons())
  File "/usr/mark2/mk2/user_client.py", line 211, in __init__
    self.build()
  File "/usr/mark2/mk2/user_client.py", line 217, in build
    g_head         = urwid.AttrMap(urwid.Columns((('weight', 3, self.g_servers), self.g_users)), 'head')
  File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1092, in __init__
    if focus_column is None and w.selectable():
  File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1411, in selectable
    return self.widget_list[self.focus_col].selectable()
IndexError: list index out of range
gsand commented 9 years ago

Try: mark2 attach -n games

TomLewis commented 9 years ago

Sadly, same error.

tom@piratecraft:~/piratecraft/games$ mark2 attach -n games
Traceback (most recent call last):
  File "/usr/bin/mark2", line 6, in <module>
    sys.exit(main())
  File "/usr/mark2/mk2/launcher.py", line 611, in main
    command.start()
  File "/usr/mark2/mk2/launcher.py", line 126, in start
    self.run()
  File "/usr/mark2/mk2/launcher.py", line 506, in run
    f = user_client.UserClientFactory(self.server_name, self.shared_path)
  File "/usr/mark2/mk2/user_client.py", line 456, in __init__
    self.ui = UI(self.config.get_palette(), self.get_players, self.run_command, self.switch_server, self.connect_to_server, self.config.get_player_actions(), self.config.get_player_reasons())
  File "/usr/mark2/mk2/user_client.py", line 211, in __init__
    self.build()
  File "/usr/mark2/mk2/user_client.py", line 217, in build
    g_head         = urwid.AttrMap(urwid.Columns((('weight', 3, self.g_servers), self.g_users)), 'head')
  File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1092, in __init__
    if focus_column is None and w.selectable():
  File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1411, in selectable
    return self.widget_list[self.focus_col].selectable()
IndexError: list index out of range
gsand commented 9 years ago

Place this file in the server directory:

https://github.com/gsand/mark2/blob/master/samples/start.sh

Then...

Enter the server, and type /restart

It should stop the server, and terminate the funky mark2 session, and restart it.

If that doesn't work, enter the server, type /stop

Then go to /tmp/mark2 and delete the servername files.

TomLewis commented 9 years ago

I did these both in order, and neither fixed it :(

gsand commented 9 years ago

try

mark2 stop games

Then delete the servername files from /tmp/mark2

TomLewis commented 9 years ago

Nope, same error.

gsand commented 9 years ago

https://toast.spi.gt/iris/?nick=&channels=mark2

Join that IRC channel so we can try other things.

gsand commented 9 years ago

pip install urwid --upgrade should fix it

TomLewis commented 9 years ago

YES! This loads the UI now, Thanks @gsand