小编Pen*_*Kim的帖子

为什么gunicorn命令没有找到gunicorn安装?

我已经安装了gunicorn,但找不到gunicorn命令:

# pip3.4 install gunicorn
Requirement already satisfied (use --upgrade to upgrade): gunicorn in /usr/local/python3.4/lib/python3.4/site-packages

# gunicorn
-bash: gunicorn: command not found
Run Code Online (Sandbox Code Playgroud)

有什么问题,gunicorn安装路径是不是被系统识别?

django gunicorn

11
推荐指数
4
解决办法
1万
查看次数

POST https:// localhost:26143/skypectoc/v1/pnr/parse net :: ERR_CONNECTION_REFUSED

我在我的聚合物网站上使用DISQUS,我得到了大约三百个这个错误,我检查了polymer-project.org,它有同样的问题.

POST https://localhost:26143/skypectoc/v1/pnr/parse net::ERR_CONNECTION_REFUSED
Run Code Online (Sandbox Code Playgroud)

polymer-project.org 网站:

在此输入图像描述

我的网站:

在此输入图像描述 在此输入图像描述 并且有大约三百个请求!

我使用像这样的disqus-commnets元素:

<core-header-panel mode="waterfall-tall" tallClass="medium-tall"  >
        <div  class="core-header ">{{response[0].title}}</div>
          <div layout horizontal center-justified flex class="contentcontainer">
            <div flex?="{{!phoneScreen}}"></div>
            <div vertical flex four style="background:#ffffff;box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); color: #555;">
              <div flex  id="content" class="markdown-body"></div>
              <div flex><disqus-comments shortname="myName"></disqus-comments></div>
            </div>
            <div flex?="{{!phoneScreen}}"></div>
          </div>
      </core-header-panel>
Run Code Online (Sandbox Code Playgroud)

是什么原因造成的?下面的错误表明了什么?

WebSocket connection to 'wss://realtime.services.disqus.com/ws/2/thread/3704740536?' failed: WebSocket is closed before the connection is established.
Run Code Online (Sandbox Code Playgroud)

并且,DISQUS甚至没有显示在firefix,safari和IE上,任何人都有任何想法?

disqus shadow-dom polymer

6
推荐指数
2
解决办法
5948
查看次数

aiohttp request.multipart() 从浏览器上传文件中得不到任何结果

浏览器使用 vue element-ui el-upload 组件上传文件,aiohttp 作为后端接收表单数据然后保存。但是 aiohttp request.multipart() 总是空白,但 request.post() 就可以了。

视图:

   <el-upload class="image-uploader" 
        :data="dataObj" 
         drag 
         name="aaa"
        :multiple="false" 
        :show-file-list="false"
        :action="action"  -> upload url,passed from outer component
        :on-success="handleImageScucess">
      <i class="el-icon-upload"></i>
    </el-upload>

export default {
  name: 'singleImageUpload3',
  props: {
    value: String,
    action: String
  },
  methods: {
   handleImageScucess(file) {
      this.emitInput(file.files.file)
    },

  }
Run Code Online (Sandbox Code Playgroud)

aiohttp:不工作

 async def post_image(self, request):

        reader = await request.multipart()

        image = await reader.next()
        print (image.text())
        filename = image.filename
        print (filename)
        size = 0
        with open(os.path.join('', 'aaa.jpg'), 'wb') as f:
            while True: …
Run Code Online (Sandbox Code Playgroud)

python multipartform-data aiohttp vue.js

2
推荐指数
1
解决办法
4205
查看次数