如何使用ipywidgets fileupload上传大文件?

2024-09-26 22:43:12 发布

您现在位置:Python中文网/ 问答频道 /正文

有一个带有Jupyterhub的服务器。它可以通过浏览器进行远程访问(仅限IP地址)。用户可以使用ipywidgets.fileupload. 但我通常不能上传超过100MB的文件:大约200MB的文件上传~10分钟。(scp命令-不到2分钟)。文件超过250MB—以内核错误结尾(但是带有“--debug”的jupyterhub没有显示任何内容)。在

浏览器控制台错误:

API request failed (0): error
:8000/user/aleksandr/api/contents/Untitled1.ipynb:1 Failed to load resource: net::ERR_EMPTY_RESPONSE
main.min.js?v=eef572336006937e9a017afbdebc65fe:24805 Uncaught (in promise) XhrError: error
    at wrap_ajax_error (http://192.168.1.49:8000/user/aleksandr/static/notebook/js/main.min.js?v=eef572336006937e9a017afbdebc65fe:24805:29)
    at Object.settings.error (http://192.168.1.49:8000/user/aleksandr/static/notebook/js/main.min.js?v=eef572336006937e9a017afbdebc65fe:24861:24)
    at u (http://192.168.1.49:8000/user/aleksandr/static/notebook/js/main.min.js?v=eef572336006937e9a017afbdebc65fe:2:27457)
    at Object.fireWith [as rejectWith] (http://192.168.1.49:8000/user/aleksandr/static/notebook/js/main.min.js?v=eef572336006937e9a017afbdebc65fe:2:28202)
    at k (http://192.168.1.49:8000/user/aleksandr/static/notebook/js/main.min.js?v=eef572336006937e9a017afbdebc65fe:2:77676)
    at XMLHttpRequest.<anonymous> (http://192.168.1.49:8000/user/aleksandr/static/notebook/js/main.min.js?v=eef572336006937e9a017afbdebc65fe:2:79882)
wrap_ajax_error @ main.min.js?v=eef572336006937e9a017afbdebc65fe:24805
settings.error @ main.min.js?v=eef572336006937e9a017afbdebc65fe:24861
u @ main.min.js?v=eef572336006937e9a017afbdebc65fe:2
fireWith @ main.min.js?v=eef572336006937e9a017afbdebc65fe:2
k @ main.min.js?v=eef572336006937e9a017afbdebc65fe:2
(anonymous) @ main.min.js?v=eef572336006937e9a017afbdebc65fe:2

一些源代码:

^{pr2}$

冻结时,“ff”功能不执行。在

我使用:

  • python:3.7.3
  • 朱皮特核心:4.5.0在
  • jupyter笔记本:6.0.0
  • ipython:7.6.1版
  • ipykernel:5.1.1
  • ipywidgets:7.5.0
  • jupyterhub:1.0.0

一些行动:

根据这个:https://github.com/jupyter-widgets/ipywidgets/issues/2522,我在朱庇尔换了衣服_配置.py公司名称:

c.Spawner.args=['--SingleUserNotebookApp.tornado_settings = {"websocket_max_message_size": 1073741824}']

启动用户笔记本时执行。以及:

c.JupyterHub.tornado_settings= {"websocket_max_message_size": 1073741824}}

一般来说,更改这些字段不会影响问题的状态。在

是否可以通过ipywidgets.fileupload?在


Tags: 文件httpsettingsmainjs浏览器staticerror

热门问题