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

jotta-share is broken #105

Open
roflmao opened this issue Feb 12, 2016 · 2 comments
Open

jotta-share is broken #105

roflmao opened this issue Feb 12, 2016 · 2 comments

Comments

@roflmao
Copy link

roflmao commented Feb 12, 2016

jottalib (0.4.2-1)

$ jotta-share lol.json
Traceback (most recent call last):
  File "/usr/local/bin/jotta-share", line 9, in <module>
    load_entry_point('jottalib==0.4.2-1', 'console_scripts', 'jotta-share')()
  File "/usr/local/lib/python2.7/dist-packages/jottalib/cli.py", line 165, in share
    jottadev = get_jotta_device(jfs)
  File "/usr/local/lib/python2.7/dist-packages/jottalib/cli.py", line 62, in get_jotta_device
    for j in jfs.devices: # find Jotta/Shared folder
  File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 984, in devices
    return self.fs is not None and [JFSDevice(d, self, parentpath=self.rootpath) for d in self.fs.devices.iterchildren()] or [x for x in []]
  File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 661, in __init__
    self.mountPoints = {unicode(mp.name):mp for mp in self.mountpointobjects()}
  File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 675, in mountpointobjects
    return [ JFSMountPoint(obj, self._jfs, self.path) for obj in self.contents().mountPoints.iterchildren() ]
  File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 670, in contents
    c = self._jfs.get('%s%s' % (self.path, path or '/'))
  File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 838, in get
    url = self.escapeUrl(url)
  File "/usr/local/lib/python2.7/dist-packages/jottalib/JFS.py", line 807, in escapeUrl
    url = quote(urlparts[0], safe=self.rootpath)
  File "/usr/lib/python2.7/urllib.py", line 1288, in quote
    return ''.join(map(quoter, s))
KeyError: u'\u2019'
@havardgulldahl
Copy link
Owner

Thank you for your report!

The current code does not properly handle unicode/bytestrings, and I highly suspect that is the cause here. Are you trying to share a file from a path that has non-ascii characters?

@havardgulldahl
Copy link
Owner

And now I just figured out that Jottacloud has gone and changed the sharing API, see #94.

So we have to fix that first.

@havardgulldahl havardgulldahl changed the title KeyError on jotta-share jotta-share is broken Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants