samuelyeewl / zotrm

Tool to sync Zotero papers to the reMarkable tablet.
25 stars 9 forks source link

remarks branch has error #9

Closed einalex closed 3 years ago

einalex commented 3 years ago
Traceback (most recent call last):
  File "/home/user/git/projects/Remarkable/zotrm/zotrm/zotrm.py", line 537, in <module>
    main(args.verbose, args.landscape, args.dry_run)
  File "/home/user/git/projects/Remarkable/zotrm/zotrm/zotrm.py", line 518, in main
    sent_papers = send_papers(zot, rmapi, config, verbose=verbose, landscape=landscape,
  File "/home/user/git/projects/Remarkable/zotrm/zotrm/zotrm.py", line 446, in send_papers
    attachments = get_pdf_attachments(paper, zot, config)
  File "/home/user/git/projects/Remarkable/zotrm/zotrm/zotrm.py", line 139, in get_pdf_attachments
    foundfiles = list(filter(r.match, pdflist))
NameError: name 'pdflist' is not defined
einalex commented 3 years ago

maybe you want something like foundfiles = glob.glob(os.path.join(dirname,"**/", filename), recursive = True) ?

samuelyeewl commented 3 years ago

Thanks for the catch, this was a bug introduced when I refactored the code to use linked base attachment directories. Fixed in e2fb6e1.