Asciinema: 上传失败并显示“Broken Pipe”

创建于 2019-01-28  ·  7评论  ·  资料来源: asciinema/asciinema

$ asciinema upload /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast

这是 tmp 文件夹中的应用程序

$ exa -l  /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast
.rw------- 5.8M user 28 Jan 16:33 /var/folders/v2/g27ngtds20zg60cy_f2jb_l80000gn/T/tmpub1dsng9-ascii.cast

所有7条评论

不知道为什么您没有收到正确的错误消息,但上传文件有 5M 的限制。 见#91

是的,这是大小限制问题。

asciinema 确实有状态 413 的错误处理程序(在这种情况下由 Web 服务器返回),但由于 Python 的 urllib 的运行方式,它似乎从未得到正确处理。 您可以在此处阅读有关该问题的更多信息: https :

今天遇到同样的问题。 如果要上传的文件超过5M,您如何看待向客户端发出警告的权宜之计?

我经常遇到远低于 5M 限制的情况。

[schwarzgerat](2) $ ls -l /tmp/user/1000/tmpaxpadd2n-ascii.cast 
-rw------- 1 dank dank 592498 2020-01-05 08:57 /tmp/user/1000/tmpaxpadd2n-ascii.cast
[schwarzgerat](0) $ asciinema upload /tmp/user/1000/tmpaxpadd2n-ascii.cast 
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /tmp/user/1000/tmpaxpadd2n-ascii.cast
[schwarzgerat](1) $ 

那个只有600K。 在本地完美播放。

可以在这里重现:

$ asciinema upload display_sweep.cast
asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload display_sweep.cast

$ ll -h display_sweep.cast
-rw-r--r-- 1 nicoo nicoo 2.3M Jan 14 21:29 display_sweep.cast

同样的事情也会发生在较小的文件上。 我试图用curl重现,但这工作正常:

$ curl --http1.1 -v -u $USER:$(cat ~/.config/asciinema/install-id) https://asciinema.org/api/asciicasts -F asciicast=@display_sweep.cast
*   Trying 109.107.38.78:443...
* TCP_NODELAY set
* Connected to asciinema.org (109.107.38.78) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=asciinema.org
*  start date: Jan 16 08:09:20 2020 GMT
*  expire date: Apr 15 08:09:20 2020 GMT
*  subjectAltName: host "asciinema.org" matched cert's "asciinema.org"
*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
*  SSL certificate verify ok.
* Server auth using Basic with user 'nicoo'
> POST /api/asciicasts HTTP/1.1
> Host: asciinema.org
> Authorization: Basic XXXXSECRETVALUEHERE
> User-Agent: curl/7.67.0
> Accept: */*
> Content-Length: 2332762
> Content-Type: multipart/form-data; boundary=------------------------8506bb168e19a8c6
> Expect: 100-continue
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Cache-Control: max-age=0, private, must-revalidate
< Content-Length: 78
< Content-Type: text/plain; charset=utf-8
< Date: Fri, 17 Jan 2020 16:47:43 GMT
< Location: https://asciinema.org/a/ucRJ70xKSlhN1QlmMW0BdSUBf
< Server: Caddy
< Server: nginx
< Strict-Transport-Security: max-age=15768000
< X-Request-Id: 2nlbkv35ad6doecmo07jcdm2
< 
View the recording at:

    https://asciinema.org/a/ucRJ70xKSlhN1QlmMW0BdSUBf
* Connection #0 to host asciinema.org left intact

这似乎是asciinema的 HTTP API 客户端特有的问题; 即使在新的venv安装asciinema表单pip时我也遇到了它; 本地 python 版本是 3.7.5(在 Debian 11/testing 中打包)

不知道为什么您没有收到正确的错误消息,但上传文件有5M 的限制。 见#91

这应该是常见问题解答项目。

一看到那个“破管子”重复了两次,我怀疑我的6.3M演员超过了上传限制。

但实际上找到这个线程花了……呃……24 分钟。 大约有 15 个我正在搞乱discobot认证,希望这能让我在常见问题讨论部分发布问题(它没有)。

我收到一个小错误:

``` sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ exit
asciinema:录制完成
asciinema:按上传到 asciinema.org,本地保存
asciinema:上传失败:
asciinema:稍后通过运行重试:asciinema upload /tmp/tmpe_sntawl-ascii.cast
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ du -sh /tmp/tmpe_sntawl-ascii.cast
184K /tmp/tmpe_sntawl-ascii.cast
sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$

Tried uploading it later too:

sontek@hulk :/mnt/c/Users/sontek/code/snowmachine$ asciinema 上传/tmp/tmpe_sntawl-ascii.cast
asciinema:上传失败:
asciinema:稍后通过运行重试:asciinema upload /tmp/tmpe_sntawl-ascii.cast
``

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

SR-Lut3t1um picture SR-Lut3t1um  ·  3评论

deeplook picture deeplook  ·  10评论

maphew picture maphew  ·  12评论

laughedelic picture laughedelic  ·  7评论

nictuku picture nictuku  ·  10评论