librelist archives

« back to archive

回复:[flask] Hi everyone!

回复:[flask] Hi everyone!

From:
罗晟
Date:
2012-01-03 @ 07:11
maybe you should reinstall your flask again.


I just copied your code and run, no error raised.


------------------
罗晟
 


 
 
 
------------------ 原始邮件 ------------------
发件人: "杨振彪"<yzb418@gmail.com>;
发送时间: 2012年1月3日(星期二) 中午1:43
收件人: "flask"<flask@librelist.com>; 

主题: [flask] Hi everyone!

 
Sorry for my poor English.
 
I  have wrote a "A Minimal Application" of flask:
 from flask import Flask
app = Flask(__name__)
  
@app.route('/')
def hello_world():
     return 'Hello World!'
 
if __name__ == '__main__':
     app.run()
   
and i use "python code.py" to started the server
when i navigate to http://127.0.0.1:5000 i got a error:
 
 Exception happened during processing of request from ('127.0.0.1', 52783)
Traceback (most recent call last):
  File "C:\Python26\lib\SocketServer.py", line 283, in _handle_request_noblock
    self.process_request(request, client_address)
   File "C:\Python26\lib\SocketServer.py", line 309, in process_request
    self.finish_request(request, client_address)
  File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
    self.RequestHandlerClass(request, client_address, self)
   File "C:\Python26\lib\SocketServer.py", line 618, in __init__
    self.finish()
  File "C:\Python26\lib\SocketServer.py", line 661, in finish
    self.wfile.flush()
  File "C:\Python26\lib\socket.py", line 297, in flush
     self._sock.sendall(buffer(data, write_offset, buffer_size))
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
 
 
any helps?
 thank you!

Re: 回复:[flask] Hi everyone!

From:
Rodrigo Aliste P.
Date:
2012-01-03 @ 08:22
I would say that maybe your python app is being blocked by your firewall.
If you have any such software, I recommend to allow your python app or the
port 5000.

On Tue, Jan 3, 2012 at 8:11 AM, 罗晟 <luo.sh@foxmail.com> wrote:

> maybe you should reinstall your flask again.
>
> I just copied your code and run, no error raised.
>
> **
> ------------------
> 罗晟
> **
> ****
>
> **
>
>
> ------------------ 原始邮件 ------------------
> *发件人:* "杨振彪"<yzb418@gmail.com>;
> *发送时间:* 2012年1月3日(星期二) 中午1:43
> *收件人:* "flask"<flask@librelist.com>; **
> *主题:* [flask] Hi everyone!
>
> Sorry for my poor English.
>
> I  have wrote a "A Minimal Application" of flask:
>
>> from flask import Flask
> app = Flask(__name__)
>
> @app.route('/')
> def hello_world():
>     return 'Hello World!'
>
> if __name__ == '__main__':
>     app.run()
>
>>
>
>
> and i use "python code.py" to started the server
> when i navigate to http://127.0.0.1:5000 i got a error:
>
> Exception happened during processing of request from ('127.0.0.1', 52783)
> Traceback (most recent call last):
>   File "C:\Python26\lib\SocketServer.py", line 283, in
> _handle_request_noblock
>     self.process_request(request, client_address)
>   File "C:\Python26\lib\SocketServer.py", line 309, in process_request
>     self.finish_request(request, client_address)
>   File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
>     self.RequestHandlerClass(request, client_address, self)
>   File "C:\Python26\lib\SocketServer.py", line 618, in __init__
>     self.finish()
>   File "C:\Python26\lib\SocketServer.py", line 661, in finish
>     self.wfile.flush()
>   File "C:\Python26\lib\socket.py", line 297, in flush
>     self._sock.sendall(buffer(data, write_offset, buffer_size))
> error: [Errno 10053] An established connection was aborted by the software
> in yo
> ur host machine
>
>
> any helps?
> thank you!
> **
>



-- 
Rodrigo Aliste P.

Re: 回复:[flask] Hi everyone!

From:
杨振彪
Date:
2012-01-03 @ 09:45
Thanks!
 The firewall blocked the port 5000.

2012/1/3 Rodrigo Aliste P. <raliste@gmail.com>

> I would say that maybe your python app is being blocked by your firewall.
> If you have any such software, I recommend to allow your python app or the
> port 5000.
>
>
> On Tue, Jan 3, 2012 at 8:11 AM, 罗晟 <luo.sh@foxmail.com> wrote:
>
>> maybe you should reinstall your flask again.
>>
>> I just copied your code and run, no error raised.
>>
>> **
>> ------------------
>> 罗晟
>> **
>> ****
>>
>> **
>>
>>
>> ------------------ 原始邮件 ------------------
>> *发件人:* "杨振彪"<yzb418@gmail.com>;
>> *发送时间:* 2012年1月3日(星期二) 中午1:43
>> *收件人:* "flask"<flask@librelist.com>; **
>> *主题:* [flask] Hi everyone!
>>
>> Sorry for my poor English.
>>
>> I  have wrote a "A Minimal Application" of flask:
>>
>>> from flask import Flask
>> app = Flask(__name__)
>>
>> @app.route('/')
>> def hello_world():
>>     return 'Hello World!'
>>
>> if __name__ == '__main__':
>>     app.run()
>>
>>>
>>
>>
>> and i use "python code.py" to started the server
>> when i navigate to http://127.0.0.1:5000 i got a error:
>>
>> Exception happened during processing of request from ('127.0.0.1', 52783)
>> Traceback (most recent call last):
>>   File "C:\Python26\lib\SocketServer.py", line 283, in
>> _handle_request_noblock
>>     self.process_request(request, client_address)
>>   File "C:\Python26\lib\SocketServer.py", line 309, in process_request
>>     self.finish_request(request, client_address)
>>   File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
>>     self.RequestHandlerClass(request, client_address, self)
>>   File "C:\Python26\lib\SocketServer.py", line 618, in __init__
>>     self.finish()
>>   File "C:\Python26\lib\SocketServer.py", line 661, in finish
>>     self.wfile.flush()
>>   File "C:\Python26\lib\socket.py", line 297, in flush
>>     self._sock.sendall(buffer(data, write_offset, buffer_size))
>> error: [Errno 10053] An established connection was aborted by the
>> software in yo
>> ur host machine
>>
>>
>> any helps?
>> thank you!
>> **
>>
>
>
>
> --
> Rodrigo Aliste P.
>
>