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

Error when launching #10

Open
josegl opened this issue Apr 6, 2018 · 1 comment
Open

Error when launching #10

josegl opened this issue Apr 6, 2018 · 1 comment

Comments

@josegl
Copy link

josegl commented Apr 6, 2018

Once I run the command:
python redditfs.py r

I get a stacktrace with this value:
ValueError: No JSON object could be decoded

Traceback (most recent call last):
  File "$HOME/programs/redditfs/env/local/lib/python2.7/site-packages/fuse.py", line 414, in _wrapper
    return func(*args, **kwargs) or 0
  File "$HOME/programs/redditfs/env/local/lib/python2.7/site-packages/fuse.py", line 422, in getattr
    return self.fgetattr(path, buf, None)
  File "$HOME/programs/redditfs/env/local/lib/python2.7/site-packages/fuse.py", line 668, in fgetattr
    attrs = self.operations('getattr', path.decode(self.encoding), fh)
  File "$HOME/programs/redditfs/env/local/lib/python2.7/site-packages/fuse.py", line 709, in __call__
    return getattr(self, op)(*args)
  File "redditfs.py", line 44, in getattr
    f = self.traverse(path)
  File "redditfs.py", line 72, in traverse
    return self._traverse(path, node)
  File "redditfs.py", line 82, in _traverse
    self._lazy_load_subreddit(next_node, fn)
  File "redditfs.py", line 98, in _lazy_load_subreddit
    return self._populate_subreddit(filename)
  File "redditfs.py", line 121, in _populate_subreddit
    links = [link['data'] for link in r.json()['data']['children']]
  File "$HOME/programs/redditfs/env/local/lib/python2.7/site-packages/requests/models.py", line 741, in json
    return json.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

I've changed the path to my home directory by $HOME

@Petraea
Copy link

Petraea commented Apr 20, 2018

Hi @josegl ,
I've just created a PR #11 that fixes this issue for at least myself. I don't know whether @ianpreston is going to merge this change in - I've not seen any updates to this repo in over a year, but you can clone my fork for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants