Closed ian1roberts closed 11 years ago
Little work around. I suggest changing json for pickle, this seems to fix the serialization issue. pyacd must have changed session api. a little.
e.g.
ln 74
if not self.session.is_logged_in:
The following seems to work with session caching for me
ian@nixbox ~$ acd amazon_cloud
/tmp/acd_fuse/sessionfile
Trying to login from cached sessionfile /tmp/acd_fuse/sessionfile
Login successful; starting filesystem
These were the lines I changed ...
import pickle
ln 68
with open(self.sessionfile, "rb") as sessfile
ln 70-3
session.__dict__ = pickle.load(sessfile)
self.session = pyacd.login(session=session)
self.session.__dict__['agreed_with_terms']=True
self.session.username = self.email
ln 81
with open(self.sessionfile, "wb") as sessfile:
ln 85
self.session.__dict__['agreed_with_terms']=True
self.session.username = self.email
pickle.dump(self.session.__dict__, sessfile)
Firstly, thanks for this tool. I've just got my cloud drive mounted on my fedora system.
I had a couple of issues 1) (not your concern) pyacd has configs for www.amazon.com and www.amazon.jp, so I had to add www.amazon.co.uk to pyacd.init.py, and set ubid ln 100. amazon_domain="www.amazon.co.uk" ln 135 "www.amazon.co.uk": "ubid-acbuk",
2) edit session dictionary object to 'accept_terms' and set username in acd ln 81-2 self.session.dict['agreed_with_terms']=True self.session.username = self.email
3) unable to dump session to file as session dictionary is not serializable. I commented out ln 83 to allow the cloud drive to mount
Would be interested in knowing if you've got a fix for (3)
Thanks again, Ian
Below is the error from json. Mounting proceeds if caching is commented out (ln 81-82)