overleaf-sync icon indicating copy to clipboard operation
overleaf-sync copied to clipboard

fix issue #63

Open JRodez opened this issue 1 year ago • 1 comments

'NoneType' object has no attribute 'get' #63 fixed with DDDOH answer

JRodez avatar May 26 '23 10:05 JRodez

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

sergei-mironov avatar Jun 11 '23 10:06 sergei-mironov