The bug is locale.getlocale() returns (None, None) and then (None, None) gets indexed. [0] = None, then [0][0:2] = error.

```
Python 2.7.6 (default, Feb 26 2014, 12:07:17)
[GCC 4.8.2 20140206 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> a = locale.getlocale()
>>> a
(None, None)
>>> a[0]
>>> a[0][0:2]
Traceback (most recent call last):
  File "", line 1, in
TypeError: 'NoneType' object has no attribute '__getitem__'
```

Here is a better patch to fix it:
```
diff --git a/server.py b/server.py
index 28292e9..f1b4404 100644
--- a/server.py
+++ b/server.py
@@ -1,5 +1,6 @@
 # -*- coding: UTF-8 -*-
 from _socket import SHUT_RDWR
+import os.path
 import gettext
 import locale
 import logging
@@ -641,12 +642,14 @@ class StarboundClientFactory(ClientFactory):
 def init_localization():
     locale.setlocale(locale.LC_ALL, '')
     loc = locale.getlocale()
-    filename = "res/messages_%s.mo" % locale.getlocale()[0][0:2]
-    try:
-        print "Opening message file %s for locale %s." % (filename, loc[0])
-        trans = gettext.GNUTranslations(open(filename, "rb" ))
-    except IOError:
-        print "Locale not found. Using default messages."
+    locstr = loc[0][0:2] if loc[0] != None else ""
+    filename = "res/messages_%s.mo" % locstr
+
+    if os.path.isfile(filename):
+        print "Opening message file %s for locale %s." % (filename, locstr)
+        trans = gettext.GNUTranslations(open(filename, "rb"))
+    else:
+        print "Locale not found, using generic locale."
         trans = gettext.NullTranslations()
     trans.install()
 
```