Suchen

Registrieren

Vielen Dank für Deine Anmeldung! Du bekommst nun eine Email mit einem Aktivierungslink.

username already taken
Du hast bereits einen Account? .

Login

Passwort vergessen?
Du hast noch keinen Account? Registrieren um den UI-Designer und das Forum zu benutzen oder eigene Projekte anzulegen.
Log dich ein um Beiträge schreiben zu können!



new python server script

#1 Dez. 5, 2013 13:01:39 by Koggel

new python server script

Hi,

i have found the error myself, the two print lines in the function plexdaemonrunning() were responsible

Best regards

Koggel

#2 Juni 21, 2014 14:29:37 by Helma

new python server script

Hi,
I´m starting the serverscript from the shell, not as a daemon. Everytime I CTRL+Z out of it
to stop it I get:
Traceback (most recent call last):
  File "/home/pi/RPi-LPD8806/Cocktail_Server_2.py", line 918, in <module>
    pollster.register(Server(("",54321),pollster), select.EPOLLIN)
  File "/home/pi/RPi-LPD8806/Cocktail_Server_2.py", line 869, in __init__
    self.bind(listen_to)
  File "/usr/lib/python2.7/asyncore.py", line 342, in bind
    return self.socket.bind(addr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)


I´ve read that it is possible to suppress this behaviour by adding
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

Can anyone tell me where to add this code in the serverscript or if there is a another way to fix my problem?

Thanks in advance!

Helma