overleaf-sync
overleaf-sync copied to clipboard
fix issue #63
'NoneType' object has no attribute 'get' #63 fixed with DDDOH answer
FYI: this PR did not fix the issue for me. Some observations:
- the following similar line still contains old-style names. I faced error on here as well.
- Even after I fixed it, I see the following error
⠏ Querying projectTraceback (most recent call last): [0/404] File "/workspace/modules/overleaf-sync/olsync/olsync.py", line 348, in execute_action success = action() File "/workspace/modules/overleaf-sync/olsync/olsync.py", line 175, in <lambda> lambda: overleaf_client.get_project(project_name), File "/workspace/modules/overleaf-sync/olsync/olclient.py", line 105, in get_project return next(OverleafClient.filter_projects(json_content, {"name": project_name}), None) File "/workspace/modules/overleaf-sync/olsync/olclient.py", line 42, in filter_projects if not p.get("archived") and not p.get("trashed"): AttributeError: 'str' object has no attribute 'get'
UPD: adding json_content = json_content["projects"]
to the top of filter_projects
function seems to fix this. I can even download pdfs, but syncing still does not work due to a problem described in #62 (does not appear to be working).
UPD2: #66 did work