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

Unhandled error when enable RTM sync service and cannot access Internet at the same time #64

Open
tkdchen opened this issue Oct 30, 2014 · 1 comment
Labels
bug patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. plugins Plugins and extra backends priority:low

Comments

@tkdchen
Copy link
Contributor

tkdchen commented Oct 30, 2014

This is a subsequent issue to #63

Version: devel

Steps to reproduce:

  1. Ensure network connection is established, but cannot access Internet. Especially when you connect to an network where authentication is required for the Internet access.
  2. Launch GTG from command line, then add RTM in synchronization service and enable it
  3. A short time later, check in the terminal, following traceback is printed

Expected result:

Catch this error, then keep silent and stop the authentication request. It's not necessary to let user know such low level errors.

Exception in thread Thread-21:
Traceback (most recent call last):
  File "/home/chen/git/gtg/GTG/backends/rtm/rtm.py", line 125, in getAuthURL
    frob = self.authInfo.get('frob')
  File "/home/chen/git/gtg/GTG/backends/rtm/rtm.py", line 74, in get
    raise AuthStateMachine.NoData('No data for <%s>' % state)
GTG.backends.rtm.rtm.NoData: No data for <frob>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.3/json/decoder.py", line 368, in raw_decode
    obj, end = self.scan_once(s, idx)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.3/threading.py", line 637, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.3/threading.py", line 594, in run
    self._target(*self._args, **self._kwargs)
  File "/home/chen/git/gtg/GTG/backends/backend_rtm.py", line 567, in _authenticate
    subprocess.Popen(['xdg-open', self.rtm.getAuthURL()])
  File "/home/chen/git/gtg/GTG/backends/rtm/rtm.py", line 127, in getAuthURL
    frob = self.getNewFrob()
  File "/home/chen/git/gtg/GTG/backends/rtm/rtm.py", line 119, in getNewFrob
    rsp = self.get(method='rtm.auth.getFrob')
  File "/home/chen/git/gtg/GTG/backends/rtm/rtm.py", line 107, in get
    data = dottedDict('ROOT', json.loads(json_data.decode('utf-8')))
  File "/usr/lib64/python3.3/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.3/json/decoder.py", line 352, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.3/json/decoder.py", line 370, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
@nekohayo
Copy link
Member

Same as issue #63, someone needs to step forward for this, patches welcome.

@nekohayo nekohayo added bug patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. priority:low labels Dec 11, 2019
@nekohayo nekohayo added the plugins Plugins and extra backends label May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug patch-or-wont-happen Core maintainers would like this, but lack time/energy. Contribute a patch or it won't happen. plugins Plugins and extra backends priority:low
Projects
None yet
Development

No branches or pull requests

2 participants