stephenmcd / django-socketio

WebSockets for Django
BSD 2-Clause "Simplified" License
1.32k stars 245 forks source link

Error When Running SocketIO Server #121

Open avidcoder123 opened 4 years ago

avidcoder123 commented 4 years ago

I get this traceback when running python manage.py runserver_socketio:

$ python manage.py runserver_socketio
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 244, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 37, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django_socketio-0.3.9-py3.6.egg\django_socketio\management\commands\runserver_socketio.py", line 57
    print "SocketIOServer running on %s:%s" % bind
                                          ^
SyntaxError: Missing parentheses in call to 'print'

How do I fix this problem?

nalibjchn commented 3 years ago

add port like: python manage.py runserver_socketio 127.0.0.1:9000 but I still have error, when run, page can be opened successfully.