stephenmcd / django-socketio

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

new Websocket() - "an invalid or illegal string was specified" #80

Open professorDante opened 9 years ago

professorDante commented 9 years ago

Getting this error when trying to view a chat room created from the chat app example. It's happening on line 395 of socket.io.js:

this.socket = new WebSocket(this._prepareUrl());

the url returned is a string which looks like:"ws://127.0.0.1:9/socket.io/websocket"

Running Django 1.4.18, django-socketio 0.3.9. Is the port number wrong here? Shouldn't it be 9000?

Starting the socketIOserver through the command: sudo python manage.py runserver_socketio

professorDante commented 9 years ago

OK, I've found the issue. If you have USE_THOUSAND_SEPARATOR = True in your settings, the port number set in DJANGO_SOCKETIO_PORT in the runserver_socket.py parses the port number as 9,000, not 9000, giving an incorrect port value.