Deja Dup:上传期间“无法在 www.googleapis.com 找到服务器”和“FileNotUploadedError 未定义”

Deja Dup:上传期间“无法在 www.googleapis.com 找到服务器”和“FileNotUploadedError 未定义”

(注意:我将把这个作为错误报告发布在 Launchpad 上,但我也在这里发布,因为我找到了一个解决方法,我想分享一下,以防其他人遇到我的情况。)

我最近安装了 Pop_OS 20.04 并从软件中心安装了 Deja Dup(flatpak版本 - 42.0,2020 年 6 月 24 日)。

我有大约 270k 个文件,占用 45GB 空间。我成功设置了 Google Drive 身份验证,并且 Google Drive 上有足够的可用空间(大约 1.5TB 可用空间)。我正在备份所有用户主文件夹.cache,除了“垃圾箱”和其他一些内容之外。

我正在使用密码来加密文件,以防万一。

我第一次尝试时,它上传了大约 50% 的数据,然后它给出了一条错误消息,在错误消息的底部显示“超时”,并在socket.timeout跟踪底部附近提到了一条跟踪,并且with_tempdir在附近顶端。不幸的是我没有保留该错误消息的副本。

第二次尝试时,我正在跟踪网络连接(使用这个简单的网络应用程序:互联网连接监控),并得到error-wifi-timeout - local network is issue与以下 Deja Dup'FileNotUploadedError' is not defined错误一致的结果:

Traceback (innermost last):
  File "/app/bin/duplicity", line 104, in <module>
    with_tempdir(main)
  File "/app/bin/duplicity", line 90, in with_tempdir
    fn()
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 1531, in main
    do_backup(action)
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 1655, in do_backup
    full_backup(col_stats)
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 561, in full_backup
    config.backend)
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 442, in write_multivol
    (tdp, dest_filename, vol_num)))
  File "/app/lib/python3.7/site-packages/duplicity/asyncscheduler.py", line 149, in schedule_task
    return self.__run_synchronously(fn, params)
  File "/app/lib/python3.7/site-packages/duplicity/asyncscheduler.py", line 175, in __run_synchronously
    ret = fn(*params)
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 441, in <lambda>
    vol_num: put(tdp, dest_filename, vol_num),
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 320, in put
    backend.put(tdp, dest_filename)
  File "/app/lib/python3.7/site-packages/duplicity/backend.py", line 393, in inner_retry
    code = _get_code_from_exception(self.backend, operation, e)
  File "/app/lib/python3.7/site-packages/duplicity/backend.py", line 353, in _get_code_from_exception
    return backend._error_code(operation, e) or log.ErrorCode.backend_error
  File "/app/lib/python3.7/site-packages/duplicity/backends/pydrivebackend.py", line 236, in _error_code
    if isinstance(error, FileNotUploadedError):
 NameError: name 'FileNotUploadedError' is not defined

在我的第三次尝试中,我卸载并重新安装了 Deja Dup(仍然是扁平版本),并且在 760 之后.gpg。文件(每个 25mb)已上传(总共 19GB),我收到以下Unable to find the server at www.googleapis.com消息。这次连接跟踪器没有检测到任何网络问题 - 但请注意,这只是一个非常原始的“轮询”,每 2 秒测试一次。也就是说,我有一个非常可靠的连接,始终为我提供 80Mbps 的速度,并且停机时间非常罕见,因此看起来它实际上不太可能与错误的互联网连接有关。

Traceback (innermost last):
  File "/app/bin/duplicity", line 104, in <module>
    with_tempdir(main)
  File "/app/bin/duplicity", line 90, in with_tempdir
    fn()
  File "/app/lib/python3.7/site-packages/duplicity/dup_main.py", line 1518, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/app/lib/python3.7/site-packages/duplicity/commandline.py", line 1192, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/app/lib/python3.7/site-packages/duplicity/commandline.py", line 1063, in set_backend
    config.backend = backend.get_backend(bend)
  File "/app/lib/python3.7/site-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/app/lib/python3.7/site-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/app/lib/python3.7/site-packages/duplicity/backends/pydrivebackend.py", line 102, in __init__
    file_list = self.drive.ListFile({u'q': u"'Root' in parents and trashed=false"}).GetList()
  File "/app/lib/python3.7/site-packages/pydrive/apiattr.py", line 162, in GetList
    for x in self:
  File "/app/lib/python3.7/site-packages/pydrive/apiattr.py", line 146, in __next__
    result = self._GetList()
  File "/app/lib/python3.7/site-packages/pydrive/auth.py", line 61, in _decorated
    self.auth.Authorize()
  File "/app/lib/python3.7/site-packages/pydrive/auth.py", line 523, in Authorize
    self.service = build('drive', 'v2', http=self.http)
  File "/app/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/app/lib/python3.7/site-packages/googleapiclient/discovery.py", line 225, in build
    requested_url, discovery_http, cache_discovery, cache, developerKey
  File "/app/lib/python3.7/site-packages/googleapiclient/discovery.py", line 282, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "/app/lib/python3.7/site-packages/oauth2client/transport.py", line 175, in new_request
    redirections, connection_type)
  File "/app/lib/python3.7/site-packages/oauth2client/transport.py", line 282, in request
    connection_type=connection_type)
  File "/app/lib/python3.7/site-packages/httplib2/__init__.py", line 1976, in request
    cachekey,
  File "/app/lib/python3.7/site-packages/httplib2/__init__.py", line 1640, in _request
    conn, request_uri, method, body, headers
  File "/app/lib/python3.7/site-packages/httplib2/__init__.py", line 1553, in _conn_request
    raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
 httplib2.ServerNotFoundError: Unable to find the server at www.googleapis.com

我重新启动了计算机,并进行了第四次尝试。这次它保存了 534 个 25MB 的文件到 Google Drive,然后给出了与上面完全相同的错误消息。

在我的第五次也是最后一次尝试中,它到达了 171 个文件,然后给出了错误'FileNotUploadedError' is not defined。该错误再次与timeout-wifi-timeout连接监视器的错误同时发生。

答案1

我在这里找到了一个临时解决方法:在 Ubuntu 18.10 中使用备份时出错(Deja Dup)是删除该flatpak版本(或快照,如果您正在使用它)并安装该deb版本(截至撰写本文时为 40.7)。第一次就完美地工作了。这确实意味着您将使用较旧的、不太完善的用户体验,但据我所知,这是唯一显着的区别。

编辑:此错误已修复该修复已在 Deja Dup 的 flatpak 和 snap 版本中发布。

相关内容