1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Discussion StarryPy - A plugin driven server wrapper written in Python.

Discussion in 'Multiplayer' started by Carrots Are Mediocre, Jan 29, 2014.

  1. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Interesting kyoto, I think this is a variant of a bug I saw earlier today. Give me a little while and I'll try to figure out what's going on.
     
  2. kyoto

    kyoto Orbital Explorer

    And ton of errors like this in console

    Code:
    2014-01-29 16:45:48,555 - starrypy.plugin_manager.PluginManager - ERROR - Error in plugin <Plugin instance: player_manager (version .1)> with function after_connect_response.
    Traceback (most recent call last):
      File "/home/starbound/StarryPy/plugin_manager.py", line 138, in do
        res = getattr(plugin, command, lambda _: True)(data)
      File "/home/starbound/StarryPy/core_plugins/player_manager/plugin.py", line 46, in after_connect_response
        self.protocol.transport.getHost().host, connection_parameters.reject_reason)
      File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 842, in getHost
        host, port = self.socket.getsockname()[:2]
    AttributeError: 'Server' object has no attribute 'socket'
    2014-01-29 16:45:48,556 - starrypy.plugin.announcer_plugin - ERROR - Attribute error in after_connect_response.
    Traceback (most recent call last):
      File "/home/starbound/StarryPy/plugins/announcer_plugin/announcer_plugin.py", line 17, in after_connect_response
        self.protocol.player.colored_name(self.config.colors) + " joined.", 0, "", "Announcer")
    AttributeError: 'NoneType' object has no attribute 'colored_name'
    2014-01-29 16:45:48,556 - starrypy.plugin_manager.PluginManager - ERROR - Error in plugin <Plugin instance: announcer_plugin (version .1)> with function after_connect_response.
    Traceback (most recent call last):
      File "/home/starbound/StarryPy/plugin_manager.py", line 138, in do
        res = getattr(plugin, command, lambda _: True)(data)
      File "/home/starbound/StarryPy/plugins/announcer_plugin/announcer_plugin.py", line 17, in after_connect_response
        self.protocol.player.colored_name(self.config.colors) + " joined.", 0, "", "Announcer")
    AttributeError: 'NoneType' object has no attribute 'colored_name'
    2014-01-29 16:45:48,557 - starrypy.plugin_manager.PluginManager - ERROR - Error in plugin <Plugin instance: new_player_greeter_plugin (version .1)> with function after_connect_response.
    Traceback (most recent call last):
      File "/home/starbound/StarryPy/plugin_manager.py", line 138, in do
        res = getattr(plugin, command, lambda _: True)(data)
      File "/home/starbound/StarryPy/plugins/new_player_greeter_plugin/new_player_greeter_plugin.py", line 20, in after_connect_response
        my_storage = self.protocol.player.storage()
    AttributeError: 'NoneType' object has no attribute 'storage'
    
     
  3. kyoto

    kyoto Orbital Explorer

    Okay. Thanks a lot.
     
  4. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Alrighty, I fixed it up. Grab a new copy of it from github and you should be golden. If you're using git, just use git pull.

    I've fixed the color and storage error problems, and actually those are helping me track down the root of your problem. Thank you very much, I'll shoot you a message when I get your player count issue fixed.

    For anyone wondering, the connections that StarryPy is making are staying half-open. This isn't terrible, but I need to force those connections to close.
     
  5. Zelakto

    Zelakto Void-Bound Voyager


    Yup, glad to test and help. :)
     
    Carrots Are Mediocre likes this.
  6. Zelakto

    Zelakto Void-Bound Voyager

    I might be going crazy but I cant log into my server, I logged out for two seconds and I tried logging back in and it says that the server is full of players (Max: 28).
     
  7. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Yup, I'm working on that issue as we speak. Kyoto reported it earlier; I hadn't run into it because I was testing on non-capped servers.
     
    Zelakto likes this.
  8. RxStrength

    RxStrength Void-Bound Voyager

    Here I am running through python lessons on code academy...it might just be the new Starbound plugin dev language now ;)
     
  9. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    I believe I have fixed your guys issue. Feel free to grab the new version and let me know!
     
  10. RaVeNrcft

    RaVeNrcft Yeah, You!

    So far i've downloaded pip-Win and updated it (download/installed pip and virtualenv .) Added the the required python elements with pip-Win ('pip install -r requirements.txt')

    But everytime I try to run 'server.py' in pip-Win I keep getting the following error...


    Is it a problem with the json config?
    Config.json
    Code:
    {
        "server_hostname": "localhost",
        "debug_file": "debug.log",
        "core_plugin_path": "./core_plugins",
        "owner_uuid": "****************************************",
        "player_db": "config/player.db",
        "server_port": 21###,
        "plugin_path": "./plugins",
        "command_prefix": "/",
        "colors": {
            "default": "^#F7EB43;",
            "guest": "^#F7EB43;",
            "registered": "^#A0F743;",
            "moderator": "^#4385F7;",
            "admin": "^#C443F7;",
            "owner": "^#F7434C;"   
        }
    }
     
  11. Maffi

    Maffi Astral Cartographer

    Looks like you are running two processes that try to bin on port 21025. Make sure that your gameserver listens on an other port (say 20124) and this is put in the config under
    "server_port". Or maybe you already have another instance of StarryPy running...

    I pushed a change to the development branch that makes it more clear what ports are to be used by the proxy.
     
  12. Usiemon

    Usiemon Cosmic Narwhal

    Hi Carrots, I'm very excited with this wrapper, but I have an issue on booting up a server with "server.py".

    Whenever I try "python ./server.py", I get this message;
    Code:
    Traceback (most recent call last):
      File "server.py", line 6, in <module>
        import construct
    ImportError: No module named construct
    
    From the look of it, it's likely that I don't have the necessary python package, but I don't have a clue of its name.
    I suspect this is due to my environment, but I really appreciate if you could help me troubleshoot this.

    My environment is as follows.

    OS: Ubuntu server 13.10, 64 bit
    Python:Installed via "apt-get install python-dev"
    pip: installed, and ran "pip install -r requirements.txt" successfully
     
  13. Maffi

    Maffi Astral Cartographer

    I am quite sure something went wrong there. construct is one of the libraries we're using and thats in the requirements.txt file.
    Please try running:
    Code:
     pip install -U --force-reinstall -r requirements.txt
     
  14. SweFox

    SweFox Guest

    Great work! We need more of these wrappers!
     
  15. Djet

    Djet Sandwich Man

    And how to run it?
     
  16. kyoto

    kyoto Orbital Explorer

    Looks like bug really fixed. Nice job! If it fails again, I'll let you know.

    New error there
    Code:
    2014-01-29 22:55:48,413 - starrypy.plugin_manager.PluginManager - ERROR - Error in plugin <Plugin instance: player_manager (version .1)> with function after_connect_response.
    Traceback (most recent call last):
      File "/home/starbound/StarryPy/plugin_manager.py", line 140, in do
        res = getattr(plugin, command, lambda _: True)(data)
      File "/home/starbound/StarryPy/core_plugins/player_manager/plugin.py", line 46, in after_connect_response
        self.protocol.player.client_id = connection_parameters.client_id
    AttributeError: 'NoneType' object has no attribute 'client_id'
    
     
  17. Usiemon

    Usiemon Cosmic Narwhal

    Thanks for a quick reply!
    Code:
    sudo pip install -U --force-reinstall -r requirements.txt
    went all right.

    It took me a bit how to actually run the default server program and the wrapper, but it looks fine so far!
     
  18. Maffi

    Maffi Astral Cartographer

    Via commandline
    Code:
    python server.py
    in the StarryPy root directory.
     
  19. Maffi

    Maffi Astral Cartographer

    Can you please provide the whole output from StarryPy? Make sure to remove your UUID and/or IP adress or send it in a direct message to me or carrots. I have a hard time figuring out what you were doing to reproduce this error. Thanks!
     
  20. kyoto

    kyoto Orbital Explorer

    Same text
    Code:
    2014-01-29 23:40:15,539 - starrypy.plugin.player_manager - INFO - Player Partizan is now on a ship.
    2014-01-29 23:40:55,347 - starrypy.plugin_manager.PluginManager - ERROR - Error in plugin <Plugin instance: player_manager (version .1)> with function after_connect_response.
    Traceback (most recent call last):
      File "/home/starbound/StarryPy/plugin_manager.py", line 140, in do
        res = getattr(plugin, command, lambda _: True)(data)
      File "/home/starbound/StarryPy/core_plugins/player_manager/plugin.py", line 46, in after_connect_response
        self.protocol.player.client_id = connection_parameters.client_id
    AttributeError: 'NoneType' object has no attribute 'client_id'
    2014-01-29 23:42:03,396 - starrypy - INFO - Created StarryPyServerProtocol with UUID XXX
     

Share This Page