handyman5 / acd_fuse

FUSE filesystem driver for Amazon Cloud Drive
Other
187 stars 23 forks source link

Error serializing JSON for session w/ latest pyacd #3

Closed lhl closed 9 years ago

lhl commented 11 years ago

Hi, great work creating this FUSE! Seems to work pretty well so far w/ a tweak or two.

The main problem I ran into is that pyacd sessions seem to cause things to break w/ JSON serialization. I just switched it to pickle and it worked fine. Happy to submit a pull request if you want?

Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Cached session failed; trying auth login
Traceback (most recent call last):
  File "./acd", line 459, in <module>
    fs.main()
  File "./acd", line 80, in main
    json.dump(self.session.__dict__, sessfile)
  File "/usr/lib/python2.7/json/__init__.py", line 189, in dump
    for chunk in iterable:
  File "/usr/lib/python2.7/json/encoder.py", line 434, in _iterencode
    for chunk in _iterencode_dict(o, _current_indent_level):
  File "/usr/lib/python2.7/json/encoder.py", line 408, in _iterencode_dict
    for chunk in chunks:
  File "/usr/lib/python2.7/json/encoder.py", line 442, in _iterencode
    o = _default(o)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <pyacd.auth.PicklableCookieJar[Cookie(version=0, name='at-main', 
...
rest={}, rfc2109=False)]> is not JSON serializable
jmturner commented 9 years ago

Hey Leonard, can I get your changes? I'd like to get this working. Thanks!

comptonqc commented 9 years ago

Fixed in the latest release.