TomFrankly / pipedream-notion-voice-notes

Take notes with your voice and send them to Notion
101 stars 52 forks source link

Error due to new version of natural #91

Open Safrone opened 1 month ago

Safrone commented 1 month ago

Describe the bug

when running the test according to the guide I receive this error:

TypeError
Cannot read properties of undefined (reading 'map')

Details
    at SentenceTokenizer.replaceAbbreviations (/tmp/__pdg__/dist/code/16157ccb517312283553eaaa945076926a83e8862411456e6deb94d0e9fdf944/node_modules/.pnpm/natural@8.0.0/node_modules/natural/lib/natural/tokenizers/sentence_tokenizer.js:67:55)
    at SentenceTokenizer.tokenize (/tmp/__pdg__/dist/code/16157ccb517312283553eaaa945076926a83e8862411456e6deb94d0e9fdf944/node_modules/.pnpm/natural@8.0.0/node_modules/natural/lib/natural/tokenizers/sentence_tokenizer.js:152:26)
    at Object.makeParagraphs (file:///tmp/__pdg__/dist/code/16157ccb517312283553eaaa945076926a83e8862411456e6deb94d0e9fdf944/code/Notion-Voice-Notes.mjs:1386:37)
    at Object.run (file:///tmp/__pdg__/dist/code/16157ccb517312283553eaaa945076926a83e8862411456e6deb94d0e9fdf944/code/Notion-Voice-Notes.mjs:2494:21)
    at null.executeComponent (/var/task/launch_worker.js:292:22)
    at MessagePort.messageHandler (/var/task/launch_worker.js:792:28)

I did a little digging into natural and it looks like they just released version 8.0.0 4 hours ago which includes a rewrite of the SentenceTokenizer which seems to break if you do not pass the constructor abbreviations here

the quick fix is probably pinning a max version natural for now

Which cloud storage app are you using? (Google Drive, Dropbox, or OneDrive) Google Drive

Have you tried updating your workflow? Happening on a new run of the test

Does the issue only happen while testing the workflow, or does it happen during normal, automated runs? testing but probably happens in the normal runs too if natural@8.0.0 is installed

Please paste the contents of your Logs tab from the notion_voice_notes action step.

Safrone commented 1 month ago

made an issue on natural as well: https://github.com/NaturalNode/natural/issues/752

TomFrankly commented 2 weeks ago

Hey @Safrone, thanks for flagging this! I can see the natural team marked the bug fixed on their end; have you been able to use the automation since then?