Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected KeyError #964

Open
ghost opened this issue Aug 25, 2023 · 0 comments
Open

Unexpected KeyError #964

ghost opened this issue Aug 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 25, 2023

Describe the bug
I was just working with maestral daemon and maestral_qt running in the background, when maestral throws a notification saying that an unexpected error had occurred, and then the try icon turned into a pause sign. Logs show as follows:

[TIMESTAMP] sync DEBUG: Created "[ABRIDGED]" on Dropbox
[TIMESTAMP] manager ERROR: Unexpected error
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/maestral/manager.py", line 771, in _handle_sync_thread_errors
    yield
  File "/usr/lib/python3.11/site-packages/maestral/manager.py", line 757, in startup_worker
    self.sync.upload_local_changes_while_inactive()
  File "/usr/lib/python3.11/site-packages/maestral/sync.py", line 1712, in upload_local_changes_while_inactive
    self.apply_local_changes(sync_events)
  File "/usr/lib/python3.11/site-packages/maestral/sync.py", line 1975, in apply_local_changes
    results.extend(res)
  File "/usr/lib/python3.11/site-packages/maestral/sync.py", line 3858, in do_parallel
    yield f.result()
          ^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/maestral/sync.py", line 2313, in _create_remote_entry
    status = self._on_local_folder_created(event)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/maestral/sync.py", line 2565, in _on_local_folder_created
    md_new = self.client.make_dir(event.dbx_path, autorename=False)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/maestral/client.py", line 1193, in make_dir
    res = self.dbx.files_create_folder_v2(dbx_path, autorename)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dropbox/base.py", line 1175, in files_create_folder_v2
    r = self.request(
        ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dropbox/dropbox_client.py", line 326, in request
    res = self.request_json_string_with_retry(host,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dropbox/dropbox_client.py", line 476, in request_json_string_with_retry
    return self.request_json_string(host,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/maestral/client.py", line 165, in request_json_string
    return super().request_json_string(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dropbox/dropbox_client.py", line 596, in request_json_string
    self.raise_dropbox_error_for_resp(r)
  File "/usr/lib/python3.11/site-packages/dropbox/dropbox_client.py", line 648, in raise_dropbox_error_for_resp
    RateLimitError_validator, res.json()['error'])
                              ~~~~~~~~~~^^^^^^^^^
KeyError: 'error'
[TIMESTAMP] manager INFO: Shutting down threads...
[TIMESTAMP] sync INFO: Sync aborted
[TIMESTAMP] manager INFO: Paused

To Reproduce
I don't know

Expected behaviour
Should not crash

System:

  • Maestral version: 1.8.0
  • Python version: 3.11.4
  • OS: [e.g. Ubuntu] Arch Linux
  • Desktop environment: [e.g. Gnome 3.32] KDE
  • PyQt version (for Linux GUI): 5.15.9
@ghost ghost added the bug Something isn't working label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

0 participants