havardgulldahl / jottalib

A library to access files stored at jottacloud.com.
GNU General Public License v3.0
83 stars 19 forks source link

jotta-scanner breaks on Arch Linux #133

Closed whoney closed 7 years ago

whoney commented 7 years ago

When trying to sync anything with jotta-scanner, it produces the following exception (regardless of supplied directory names):

$ jotta-scanner sm supa                                                                                                                        Traceback (most recent call last):
  File "/usr/bin/jotta-scanner", line 11, in <module>
    load_entry_point('jottalib==0.5.1', 'console_scripts', 'jotta-scanner')()
  File "/usr/lib/python2.7/site-packages/jottalib/cli.py", line 443, in scanner
    filescanner(args.topdir, args.jottapath, jfs, args.errorfile, args.exclude, args.dry_run, args.prune_files, args.prune_folders)
  File "/usr/lib/python2.7/site-packages/jottalib/scanner.py", line 72, in filescanner
    for dirpath, onlylocal, onlyremote, bothplaces, onlyremotefolders in jottacloud.compare(topdir, jottapath, jfs, exclude_patterns=exclude):
  File "/usr/lib/python2.7/site-packages/jottalib/jottacloud.py", line 130, in compare
    cloudfiles = filelist(jottapath, JFS) # set(). these are on jottacloud
  File "/usr/lib/python2.7/site-packages/jottalib/jottacloud.py", line 76, in filelist
    jf = JFS.getObject(jottapath)
  File "/usr/lib/python2.7/site-packages/jottalib/JFS.py", line 1057, in getObject
    o = self.get(url, params=params) # (.get() will parse this for us)
  File "/usr/lib/python2.7/site-packages/jottalib/JFS.py", line 1026, in get
    content = StringIO(self.raw(url, params=params))
  File "/usr/lib/python2.7/site-packages/jottalib/JFS.py", line 1019, in raw
    JFSError.raiseError(o, url)
  File "/usr/lib/python2.7/site-packages/jottalib/JFS.py", line 114, in raiseError
    raise JFSCredentialsError("Your credentials don't match for %s (%s) (probably incorrect password!)" % (path, e.message))
jottalib.JFS.JFSCredentialsError: Your credentials don't match for supa/sm (org.springframework.security.authentication.BadCredentialsException: Error during authentication, authenticating user (XXXXX) is different from path user (XXXXXsupa)) (probably incorrect password!)

where XXXXX stands for my user name. At the same time, jotta-ls, jotta-upload and jotta-download are working normally.

My system is up to date with current Arch Linux upstream repositories.

$ python2 --version
Python 2.7.12

Is there anything I can do to help resolve the issue?

sjurtf commented 7 years ago

I believe you are calling jotta-scanner wrong.

You need to specify where in the jfs you wan't to store the file/folder named 'sm'. For instance: jotta-scanner sm /Jotta/Sync

This will upload the file/folder 'sm' to your Sync directory.

whoney commented 7 years ago

Yes, that worked, thank you! My fault indeed, sorry for being too lazy to read the docs thoroughly.