JSONDecodeError when running `api.files.dir()`
See original GitHub issueBefore running api.files.dir()
, I authenticate and test using api.devices
. Everything checks out.
Then, I run:
>>> api.files.dir()
and get:
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyicloud/services/ubiquity.py", line 48, in __getattr__
return getattr(self.root, attr)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyicloud/services/ubiquity.py", line 44, in root
self._root = self.get_node(0)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyicloud/services/ubiquity.py", line 25, in get_node
return UbiquityNode(self, request.json())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/models.py", line 894, in json
return complexjson.loads(self.text, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I did some shallow digging and ran:
>>> api.files._root is None
True
Has anyone seen this before? Is there a fix for this? I tested with python3.6 and python2.7. Let me know if I should provide more info.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why am I getting a JSONDecodeError when trying to load a ...
I'm trying to load a JSON file in to Python, but it's giving me an JSONDecodeError error which seems to suggest the file...
Read more >5/20 pipelines fail with JSONDecodeError · Issue #202 - GitHub
I restarted the workflows with identical input JSON files and identical commands using the file DBs, and they finished without error. Is there ......
Read more >Python JSON tricks: how to deal with JSONDecodeError
Trick 1: You should use double quotes for keys and values, otherwise you will have the JSONDecodeError error: To solve this error, you...
Read more >Question about converting Twitter Search API JSON file to CSV
Need to convert a JSON file to CSV, and the JSON file was downloaded from the Twitter Search API using twarc2. Twarc search...
Read more >Azure Databricks CLI "Error: JSONDecodeError - Endjin
Have you been trying to create a Databricks cluster using the CLI? ... required to pass in either a JSON string or a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The back-end for the files api changed awhile back and needs to be reimplemented. pyicloud can’t currently work with iCloud drive files.
@avanalfen This response is late but install directly from github to get a version of pyicloud that works with the new Photo’s backend.
Seems to have the solution in #166.
Please create a new issue if still exists.