Unable to have it working.
Opened this issue · 0 comments
Igaryu commented
Hi, I've read your article on Medium, and want to try your script: unfortunally all time I run it, I have always this problem:
iMac:Interesting-People-On-Medium-master user$ python finder.py --name IgaRyu --min-recommendations 10
Looking for interesting users for IgaRyu...
Retrieving user ID...
Retrieving users from Followings...
Retrieving the latest posts...
Traceback (most recent call last):
File "finder.py", line 188, in <module>
main()
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "finder.py", line 183, in main
interesting_users = get_interesting_users(name, min_recommendations)
File "finder.py", line 170, in get_interesting_users
posts = get_list_of_latest_posts_ids(usernames)
File "finder.py", line 70, in get_list_of_latest_posts_ids
response_dict = clean_json_response(response)
File "finder.py", line 14, in clean_json_response
return json.loads(response.text.replace('])}while(1);</x>', '', 1))
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/json/__init__.py", line 357, in loads
return _default_decoder.decode(s)
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Users/user/.pyenv/versions/3.8.0/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
iMac:Interesting-People-On-Medium-master user$
But I don't understand wich is the problem…
Can you give me a path to follow to resolve the problem?
I was forgetting: I'm on a Mac using brew and pip to manage python projects.
Tnx
JC