Giter VIP home page Giter VIP logo

django-c10k-demo's People

Contributors

aaugustin avatar ptone avatar xordoquy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-c10k-demo's Issues

a UnicodeEncodeError occurred when using c10ktools in non-english Django project.

I want use "@websockt" in my Django project, so I add the c10ktools app in my Django project.
but when i visit a webpage which contains non-english charsets. I met a error in server shell. as below:

D:\test\python\django\mysite>python manage.py runserver 192.168.1.100:80
Validating models...

0 errors found
April 12, 2014 - 14:15:30
Django version 1.6.2, using settings 'mysite.settings'
Starting development server at http://192.168.1.100:80/
Quit the server with CTRL-BREAK.
ERROR:root:Error handling request
Traceback (most recent call last):
  File "C:\Python34\lib\site-packages\aiohttp\server.py", line 196, in start
    yield from handler
  File "C:\Python34\lib\site-packages\aiohttp\wsgi.py", line 161, in handle_requ
est
    riter = self.wsgi(environ, response.start_response)
  File "C:\Python34\lib\site-packages\django\contrib\staticfiles\handlers.py", l
ine 66, in __call__
    if not self._should_handle(get_path_info(environ)):
  File "C:\Python34\lib\site-packages\django\core\handlers\base.py", line 259, i
n get_path_info
    path_info = path_info.encode('iso-8859-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 17-20: o
rdinal not in range(256)

gameoflife demo can't run. (under winxp. python3.4)

I download the c10k demo, and run it as below step.

  1. In the first shell, start the server: python manage.py runserver
  2. In the second shell, start the workers: python manage.py gameoflife
  3. In a browser, go to http://localhost:8000/
    when i visit http://localhost:8000/ . but, I see nothing on the http://localhost:8000/ . if i refresh the webpage, i can seen "Watcher connected" and "Watcher disconnected" printed in the webserver shell.
    when i visit "http://localhost:8000/watcher", "http://localhost:8000/reset" and "http://localhost:8000/worker", i met a InvalidHandshake error on every page.
    for example, when visit "http://localhost:8000/watcher", error message as below:
InvalidHandshake at /watcher/

Invalid request

Request Method:     GET
Request URL:    http://127.0.0.1:8000/watcher/
Django Version:     1.6.2
Exception Type:     InvalidHandshake
Exception Value:    

Invalid request

Exception Location:     C:\Python34\lib\site-packages\websockets\handshake.py in check_request, line 89
Python Executable:  C:\Python34\python.exe
Python Version:     3.4.0
Python Path:    

['D:\\test\\python\\django\\django-c10k-demo-master',
 'C:\\WINDOWS\\system32\\python34.zip',
 'C:\\Python34\\DLLs',
 'C:\\Python34\\lib',
 'C:\\Python34',
 'C:\\Python34\\lib\\site-packages']

Server time:    Sat, 5 Apr 2014 13:22:13 +0800
Traceback Switch to copy-and-paste view

    C:\Python34\lib\site-packages\django\core\handlers\base.py in get_response

                            response = wrapped_callback(request, *callback_args, **callback_kwargs)

        ...
    ▶ Local vars
    D:\test\python\django\django-c10k-demo-master\c10ktools\http\websockets.py in wrapper

                return WebSocketResponse(environ, switch_protocols)

        ...
    ▶ Local vars
    D:\test\python\django\django-c10k-demo-master\c10ktools\http\websockets.py in __init__

                key = handshake.check_request(get_header)

        ...
    ▶ Local vars
    C:\Python34\lib\site-packages\websockets\handshake.py in check_request

                raise InvalidHandshake("Invalid request") from exc

        ...
    ▶ Local vars 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.