Skip to content

Navigation Menu

Sign in
Sign up

OSError: [Errno 49] Can't assign requested address - running simple server example #130

Open

Description

Hi,

I've been struggling with getting the OSC server working so that I can receive messages from software sending them on another machine.

I have the example client code working and can see my message received and can see a message coming back in Protokol.

I've changed the IP and Port to a different port on the other machine in the simple server example code. I get the Errno49 noted above when I run it.

I I use the lighting console software on the other machine to trigger an out going OSC message, I can see that in Protokol.

I've spent several days on this trying on different computers with different ports, etc. I disabled the firewall on the second computer with no change.

Any help would be appreciated. Thanks in advance.

Hope this code formats correctly.

======================================================


"""Small example OSC server
 This program listens to several addresses, and prints some information about
 received packets.
"""
import argparse
import math
from pythonosc import dispatcher
from pythonosc import osc_server
def print_volume_handler(unused_addr, args, volume):
 print("[{0}] ~ {1}".format(args[0], volume))
def print_compute_handler(unused_addr, args, volume):
 try:
 print("[{0}] ~ {1}".format(args[0], args[1](volume)))
 except ValueError: pass
if __name__ == "__main__":
 parser = argparse.ArgumentParser()
 parser.add_argument("--ip",
 default="192.168.86.91", help="The ip to listen on")
 parser.add_argument("--port",
 type=int, default=5005, help="The port to listen on")
 args = parser.parse_args()
 dispatcher1 = dispatcher.Dispatcher()
 dispatcher1.map("/filter", print)
 dispatcher1.map("/volume", print_volume_handler, "Volume")
 dispatcher1.map("/logvolume", print_compute_handler, "Log volume", math.log)
 server = osc_server.BlockingOSCUDPServer((args.ip, args.port), dispatcher1)
 print("Serving on {}".format(server.server_address))
 server.serve_forever()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /