运行python np.empty报empty reply from server

empty reply from server 什么意思_百度知道
empty reply from server 什么意思
?????empty reply from server 什么意思??
我有更好的答案
//b.baidu.baidu.com/zhidao/wh%3D600%2C800/sign=b87bf47db95fefc2e37b14/aa1fa4fdf42be9e510fb30f24088d.jpg" esrc="http://b.hiphotos服务器无答复。前两天有人问了一样的问题呵呵。
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。在 SegmentFault,学习技能、解决问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。
问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
用hexo搭了个blog,之前一直正常,最近在deploy的时候无法连接到github了。
fatal: unable to access ‘’: Empty reply from server.
请问这是怎么回事
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
可参照这篇
我测试了,使用ssh传输方式没问题。有可能最近github又给强了
注意:初始化git的时候,添加远程仓库的地址,选择ssh的地址git remote add origin :zzuhan/slider.git
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
撸主解决了吗?我最近也遇到这个问题了。我用ssh -T 返回是You've successfully authenticated, but GitHub does not provide shell access.但还是fatal: unable to access '': Empty reply from server
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
跟github软件 和 mac os x系统没一点关系,我党开启了屏蔽,如果有需求,建议使用vpn吧,确确实实是没办法,我用的曲径,评价还不错
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
翻墙是中国程序员的必备技能。
同步到新浪微博
分享到微博?
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
我要该,理由是:
在 SegmentFault,学习技能、解决问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。21.22. http.server — HTTP servers & Python 3.4.7 documentation
— HTTP servers
Source code:
This module defines classes for implementing HTTP servers (Web servers).
One class, , is a socketserver.TCPServer subclass.
It creates and listens at the HTTP socket, dispatching the requests to a
Code to create and run the server looks like this:
def run(server_class=HTTPServer, handler_class=BaseHTTPRequestHandler):
server_address = ('', 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
class http.server.HTTPServer(server_address, RequestHandlerClass)
This class builds on the TCPServer class by storing
the server address as instance variables named server_name and
server_port. The server is accessible by the handler, typically
through the handler’s server instance variable.
must be given a RequestHandlerClass on instantiation,
of which this module provides three different variants:
class http.server.BaseHTTPRequestHandler(request, client_address, server)
This class is used to handle the HTTP requests that arrive at the server.
itself, it cannot respond to any actual HTTP it must be subclassed
to handle each request method (e.g. GET or POST).
provides a number of class and instance
variables, and methods for use by subclasses.
The handler will parse the request and the headers, then call a method
specific to the request type. The method name is constructed from the
request. For example, for the request method SPAM, the do_SPAM()
method will be called with no arguments. All of the relevant information is
stored in instance variables of the handler.
Subclasses should not need to
override or extend the
has the following instance variables:
client_address
Contains a tuple of the form (host, port) referring to the client’s
Contains the server instance.
close_connection
Boolean that should be set before
indicating if another request may be expected, or if the connection should
be shut down.
requestline
Contains the string representation of the HTTP request line. The
terminating CRLF is stripped. This attribute should be set by
. If no valid request line was processed, it
should be set to the empty string.
Contains the command (request type). For example, 'GET'.
Contains the request path.
request_version
Contains the version string from the request. For example, 'HTTP/1.0'.
Holds an instance of the class specified by the
variable. This instance parses and manages the headers in the HTTP
request. The parse_headers() function from
is used to parse the headers and it requires that the
HTTP request provide a valid
style header.
Contains an input stream, positioned at the start of the optional input
Contains the output stream for writing a response back to the
client. Proper adherence to the HTTP protocol must be used when writing to
this stream.
has the following class variables:
server_version
Specifies the server software version.
You may want to override this. The
format is multiple whitespace-separated strings, where each string is of
the form name[/version]. For example, 'BaseHTTP/0.2'.
sys_version
Contains the Python system version, in a form usable by the
method and the
variable. For example, 'Python/1.4'.
error_message_format
Specifies a format string for building an error response to the client. It
uses parenthesized, keyed format specifiers, so the format operand must be
a dictionary. The code key should be an integer, specifying the numeric
HTTP error code value. message should be a string containing a
(detailed) error message of what occurred, and explain should be an
explanation of the error code number. Default message and explain
values can found in the
class variable.
error_content_type
Specifies the Content-Type HTTP header of error responses sent to the
The default value is 'text/html'.
protocol_version
This specifies the HTTP protocol version used in responses.
'HTTP/1.1', the server will permit HTTP pe
however, your server must then include an accurate Content-Length
header (using ) in all of its responses to clients.
For backwards compatibility, the setting defaults to 'HTTP/1.0'.
MessageClass
Specifies an -like class to parse HTTP
Typically, this is not overridden, and it defaults to
http.client.HTTPMessage.
This variable contains a mapping of error code integers to two-element tuples
containing a short and long message. For example, {code: (shortmessage,
longmessage)}. The shortmessage is usually used as the message key in an
error response, and longmessage as the explain key (see the
class variable).
instance has the following methods:
once (or, if persistent connections are
enabled, multiple times) to handle incoming HTTP requests. You should
never instead, implement appropriate do_*()
handle_one_request()
This method will parse and dispatch the request to the appropriate
do_*() method.
You should never need to override it.
handle_expect_100()
When a HTTP/1.1 compliant server receives an Expect: 100-continue
request header it responds back with a 100 Continue followed by 200
OK headers.
This method can be overridden to raise an error if the server does not
want the client to continue.
For e.g. server can chose to send 417
Expectation Failed as a response header and return False.
New in version 3.2.
send_error(code, message=None, explain=None)
Sends and logs a complete error reply to the client. The numeric code
specifies the HTTP error code, with message as an optional, short, human
readable description of the error.
The explain argument can be used to
provide more detailed informa it will be formatted
class variable and emitted, after
a complete set of headers, as the response body.
class variable holds the default values for message and explain that
will be used if
for unknown codes the default value
for both is the string ???.
Changed in version 3.4: The error response includes a Content-Length header.
Added the explain argument.
send_response(code, message=None)
Adds a response header to the headers buffer and logs the accepted
request. The HTTP response line is written to the internal buffer,
followed by Server and Date headers. The values for these two headers
are picked up from the
methods, respectively. If the server does not
intend to send any other headers using the
should be followed by an
Changed in version 3.3: Headers are stored to an internal buffer and
needs to be called explicitly.
Adds the HTTP header to an internal buffer which will be written to the
output stream when either
invoked. keyword should specify the header keyword, with value
specifying its value. Note that, after the send_header calls are done,
MUST BE called in order to complete the operation.
Changed in version 3.2: Headers are stored in an internal buffer.
send_response_only(code, message=None)
Sends the response header only, used for the purposes when 100
Continue response is sent by the server to the client. The headers not
buffered and sent directly the output stream.If the message is not
specified, the HTTP message corresponding the response code
New in version 3.2.
Adds a blank line
(indicating the end of the HTTP headers in the response)
to the headers buffer and calls .
Changed in version 3.2: The buffered headers are written to the output stream.
Finally send the headers to the output stream and flush the internal
headers buffer.
New in version 3.3.
log_request(code='-', size='-')
Logs an accepted (successful) request. code should specify the numeric
HTTP code associated with the response. If a size of the response is
available, then it should be passed as the size parameter.
log_error(...)
Logs an error when a request cannot be fulfilled. By default, it passes
the message to , so it takes the same arguments
(format and additional values).
log_message(format, ...)
Logs an arbitrary message to sys.stderr. This is typically overridden
to create custom error logging mechanisms. The format argument is a
standard printf-style format string, where the additional arguments to
are applied as inputs to the formatting. The client
ip address and current date and time are prefixed to every message logged.
version_string()
Returns the server software’s version string. This is a combination of the
class variables.
Returns the date and time given by timestamp (which must be None or in
the format returned by ), formatted for a message
header. If timestamp is omitted, it uses the current date and time.
The result looks like 'Sun, 06 Nov 1994 08:49:37 GMT'.
Returns the current date and time, formatted for logging.
address_string()
Returns the client address.
Changed in version 3.3: Previously, a name lookup was performed. To avoid name resolution
delays, it now always returns the IP address.
class http.server.SimpleHTTPRequestHandler(request, client_address, server)
This class serves files from the current directory and below, directly
mapping the directory structure to HTTP requests.
A lot of the work, such as parsing the request, is done by the base class
This class implements the
functions.
The following are defined as class-level attributes of
server_version
This will be &SimpleHTTP/& + __version__, where __version__ is
defined at the module level.
extensions_map
A dictionary mapping suffixes into MIME types. The default is
signified by an empty string, and is considered to be
application/octet-stream. The mapping is used case-insensitively,
and so should contain only lower-cased keys.
class defines the following methods:
This method serves the 'HEAD' request type: it sends the headers it
would send for the equivalent GET request. See the
method for a more complete explanation of the possible headers.
The request is mapped to a local file by interpreting the request as a
path relative to the current working directory.
If the request was mapped to a directory, the directory is checked for a
file named index.html or index.htm (in that order). If found, the
file’s c otherwise a directory listing is generated
by calling the list_directory() method. This method uses
to scan the directory, and returns a 404 error
response if the
If the request was mapped to a file, it is opened and the contents are
exception in opening the requested file is
mapped to a 404, 'File not found' error. Otherwise, the content
type is guessed by calling the guess_type() method, which in turn
uses the extensions_map variable.
A 'Content-type:' header with the guessed content type is output,
followed by a 'Content-Length:' header with the file’s size and a
'Last-Modified:' header with the file’s modification time.
Then follows a blank line signifying the end of the headers, and then the
contents of the file are output. If the file’s MIME type starts with
text/ the file is otherwise binary mode is used.
For example usage, see the implementation of the
invocation in the
class can be used in the following
manner in order to create a very basic webserver serving files relative to
the current directory:
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer((&&, PORT), Handler)
print(&serving at port&, PORT)
httpd.serve_forever()
can also be invoked directly using the
switch of the interpreter with a port number argument.
Similar to
the previous example, this serves files relative to the current directory:
python -m http.server 8000
By default, server binds itself to all interfaces.
The option -b/--bind
specifies a specific address to which it should bind.
For example, the
following command causes the server to bind to localhost only:
python -m http.server 8000 --bind 127.0.0.1
New in version 3.4: --bind argument was introduced.
class http.server.CGIHTTPRequestHandler(request, client_address, server)
This class is used to serve either files or output of CGI scripts from the
current directory and below. Note that mapping HTTP hierarchic structure to
local directory structure is exactly as in .
CGI scripts run by the
class cannot execute
redirects (HTTP code 302), because code 200 (script output follows) is
sent prior to execution of the CGI script.
This pre-empts the status
The class will however, run the CGI script, instead of serving it as a file,
if it guesses it to be a CGI script.
Only directory-based CGI are used —
the other common server configuration is to treat special extensions as
denoting CGI scripts.
The do_GET() and do_HEAD() functions are modified to run CGI scripts
and serve the output, instead of serving files, if the request leads to
somewhere below the cgi_directories path.
defines the following data member:
cgi_directories
This defaults to ['/cgi-bin', '/htbin'] and describes directories to
treat as containing CGI scripts.
defines the following method:
This method serves the 'POST' request type, only allowed for CGI
Error 501, “Can only POST to CGI scripts”, is output when trying
to POST to a non-CGI url.
Note that CGI scripts will be run with UID of user nobody, for security
Problems with the CGI script will be translated to error 403.
can be enabled in the command line by passing
the --cgi option:
python -m http.server --cgi 8000Reported by:
Milestone:
Component:
Sensitive:
Linux app519.blah.com 2.6.32-220.el6.x86_64 #1 SMP Sat Dec 10 17:04:11 CST
x86_64 x86_64 GNU/Linux
nginx version: nginx/1.4.1
built by gcc 4.4.7
(Red Hat 4.4.7-3) (GCC)
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_stub_status_module --with-http_realip_module --with-http_ssl_module --with-http_gzip_static_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/usr/lib/ruby/gems/1.8/gems/passenger-enterprise-server-4.0.0.rc4/ext/nginx
Comments only
Change History (16)
by maximilian.weber@…
by maximilian.weber@…
follow-up:
by maximilian.weber@…
in reply to:
follow-up:
by maximilian.weber@…
in reply to:
by maximilian.weber@…
by mdounin
by vorona.al@…
by mdounin
by vorona.al@…
by mdounin
by Maxim Dounin &mdounin@…&
by mdounin
Resolution
set to fixed
changed from new to closed
by Maxim Dounin &mdounin@…&
for help on using
Download in other formats:}

我要回帖

更多关于 empty reply from 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信