Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'frontmatter') #41

Open
olgabot opened this issue Dec 17, 2022 · 0 comments
Open

Cannot read properties of undefined (reading 'frontmatter') #41

olgabot opened this issue Dec 17, 2022 · 0 comments

Comments

@olgabot
Copy link

olgabot commented Dec 17, 2022

The previous error (#40) is fixed, and I have a new error, yay!

I'm able to get authors:sync and articles:sync to work:

Screen Shot 2022-12-17 at 12 49 36

However, for the Articles, only the fields of Title, Status, Venue, ID, and Authors get populated, even though the rest are created in models/article.ts:

const Topics = makeMultiSelect(bib.topics)

Here's the error from paperpile-notion articles:sync references.bib -c .config/paperpile-notion/config.js:

Yifang Hu TypeError: Cannot read properties of undefined (reading 'frontmatter')
    at /usr/local/lib/node_modules/@jmuchovej/paperpile-notion/dist/models/article.js:89:50
    at Array.map (<anonymous>)
    at prepareBibTeXForNotion (/usr/local/lib/node_modules/@jmuchovej/paperpile-notion/dist/models/article.js:87:46)
    at /usr/local/lib/node_modules/@jmuchovej/paperpile-notion/dist/commands/articles/sync.js:17:61
    at /usr/local/lib/node_modules/@jmuchovej/paperpile-notion/node_modules/lodash/lodash.js:928:11
    at /usr/local/lib/node_modules/@jmuchovej/paperpile-notion/node_modules/lodash/lodash.js:4967:15
    at baseForOwn (/usr/local/lib/node_modules/@jmuchovej/paperpile-notion/node_modules/lodash/lodash.js:3032:24)
    at /usr/local/lib/node_modules/@jmuchovej/paperpile-notion/node_modules/lodash/lodash.js:4936:18
    at baseReduce (/usr/local/lib/node_modules/@jmuchovej/paperpile-notion/node_modules/lodash/lodash.js:925:5)
    at Function.reduce (/usr/local/lib/node_modules/@jmuchovej/paperpile-notion/node_modules/lodash/lodash.js:9749:14)
Found 5121 articles in BibTeX and 2353 on Notion...
Creating... 2768
Updating... 2353
 ›   Error: We've been rate limited. Please run again in ~20 minutes.

Any ideas? Maybe it's frontmatter as referenced by this articles/sync.ts file?

const ID = richTextAsPlainText(page.frontmatter.ID)

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant