xybu / onedrive-d-old

Microsoft OneDrive client on Linux.
http://xybu.me/projects/onedrive-d/
GNU Lesser General Public License v3.0
820 stars 143 forks source link

Crashes when not currently online #90

Closed jbruck closed 9 years ago

jbruck commented 9 years ago

Ubuntu14.04 64bit wip branch

If onedrive-d is run using Startup Applications. It generally fails to start as it is run before the wifi connection is up.

I can confirm it fails when not online with the following output, but works when I reconnect.

$ onedrive-d
Traceback (most recent call last):
  File "/usr/local/bin/onedrive-d", line 9, in <module>
    load_entry_point('onedrive-d==0.85', 'console_scripts', 'onedrive-d')()
  File "/usr/local/lib/python2.7/dist-packages/onedrive_d-0.85-py2.7.egg/onedrive_d/daemon.py", line 169, in main
    quota = API.get_quota()
  File "/usr/local/lib/python2.7/dist-packages/onedrive/api_v5.py", line 505, in get_quota
    super(OneDriveAPI, self).get_quota()))
  File "/usr/local/lib/python2.7/dist-packages/onedrive/api_v5.py", line 360, in get_quota
    return self('me/skydrive/quota')
  File "/usr/local/lib/python2.7/dist-packages/onedrive/api_v5.py", line 347, in __call__
    return self.request(api_url(), **kwz)
  File "/usr/local/lib/python2.7/dist-packages/onedrive/api_v5.py", line 180, in request
    raise raise_for.get(code, ProtocolError)(code, message)
onedrive.api_v5.ProtocolError: (None, "('Connection aborted.', gaierror(-2, 'Name or service not known'))")
Exception ImportError: 'No module named onedrive' in <bound method PersistentOneDriveAPI.__del__ of <onedrive.api_v5.PersistentOneDriveAPI object at 0x7f3310ee2490>> ignored
xybu commented 9 years ago

Thanks for raising this issue. Two things. wip branch is deprecated in favor of, currently, 1.0-dev branch. And second, the problem you reported also exists in the latter branch (since it hasn't come to a stage stable enough for me to expect others to integrate it with the system).

As you may notice, I haven't done any major update to onedrive-d starting late August "thanks to" the unexpectedly heavy course workload I get this semester. But I can definitely push a fix in late December when my winter break starts.

Really sorry for delivering experimental software and not having time to improve it...

xybu commented 9 years ago

future branch adds feature to fully recover from Auth errors.