zoukankan      html  css  js  c++  java
  • 函数计算的 Python手册小问题

    函数计算的 Python手册小问题

    今天跟着 函数计算 Python 入门手册 一起做,被卡在下图这里报错。在关于 WSGI 普通入口函数介绍中:
    image

     {
       "errorMessage": "'NoneType' object has no attribute 'split'",
       "errorType": "AttributeError",
       "stackTrace": [
          [
             "File "/var/fc/runtime/python2.7/src/server.py"",
             "line 276",
             "in do_POST",
             "wsgi_handler.run(application)"
          ],
          [
             "File "/usr/local/lib/python2.7/wsgiref/handlers.py"",
             "line 92",
             "in run",
             "self.close()"
          ],
          [
             "File "/usr/local/lib/python2.7/wsgiref/simple_server.py"",
             "line 33",
             "in close",
             "self.status.split(' ',1)[0], self.bytes_sent"
          ]
       ]
    } 
    

    参考 简单的WSGI例子 - CSDN 加入这句 context('200 OK', [('Content-Type', 'text/html')])

    def handler(event, context):
        context('200 OK', [('Content-Type', 'text/html')])
        return '<h1>Hello, web!</h1>'
    

    即可。

  • 相关阅读:
    union
    大端和小端
    迭代器
    STL
    动态内存管理2
    动态内存管理
    关于 FlexBox
    CSS的居中问题
    操作符
    JavaScript介绍
  • 原文地址:https://www.cnblogs.com/aubucuo/p/fc1.html
Copyright © 2011-2022 走看看