TomFrankly / pipedream-notion-voice-notes

Take notes with your voice and send them to Notion
94 stars 49 forks source link

Fail to Read Audio File Metadata after updating notion_voice_note to 0.7.7 OneDrive version #57

Closed babulee closed 5 months ago

babulee commented 6 months ago

Describe the bug After updating notion_voice_notes to 0.7.7, I cannot get past notion_voice_notes testing as it continues to fail at reading audio file metadata despite the fact I have gone back to test ms_onedrive_download successfully.

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

Have you tried updating your workflow? Please follow the steps here, and ensure you've tested the latest version of the workflow: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#update Yes running 0.7.7

Does the issue only happen while testing the workflow, or does it happen during normal, automated runs? The issue happens while testing the workflow

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

No language set. Whisper will attempt to detect the language.

at Object.getDuration (file:///tmp/__pdg__/dist/code/f124a850c3f703097b5494bd1efc77777c2efa4db1b6462c7952f47e82001a2f/code/Notion-Voice-Notes.mjs:338:12)
at Object.run (file:///tmp/__pdg__/dist/code/f124a850c3f703097b5494bd1efc77777c2efa4db1b6462c7952f47e82001a2f/code/Notion-Voice-Notes.mjs:1967:23)
at null.executeComponent (/var/task/launch_worker.js:267:22)
at MessagePort.messageHandler (/var/task/launch_worker.js:764:28)

Attempting to clean up the /tmp/ directory...

File tmpSample Audio File2.mp3 does not exist.

Directory does not exist.

babulee commented 6 months ago

I tried the dropbox and googleDrive version of workflow with notion_voice_notes updated to 0.7.7, both work fine during testing and deployment. Only OneDrive version gives me this error during testing and not able to deploy.

Jose-agg commented 6 months ago

Hi,

I had the same issue when trying to test the automation for OneDrive. It's my first time using the automation, so I'm not aware if this has been the case for a long time or it just started with the version I'm trying (v 0.7.7)

Basically I have the same scenario that @babulee is mentioning: the first two steps succed and the Sample Audio is downloaded in the tmp folder image

However, when trying to run the third step, it fails with the following logs

05/01/2024, 17:28:56 - Checking that file is under 300mb...
05/01/2024, 17:28:56 - File size is approximately 6.1mb.
05/01/2024, 17:28:56 - File is under the size limit. Continuing...
05/01/2024, 17:28:56 - Checking if the user set languages...
05/01/2024, 17:28:56 - No language set. Whisper will attempt to detect the language.
05/01/2024, 17:28:56 - at Object.getDuration (file:///tmp/__pdg__/dist/code/f124a850c3f703097b5494bd1efc77777c2efa4db1b6462c7952f47e82001a2f/code/Notion-Voice-Notes.mjs:338:12) at Object.run (file:///tmp/__pdg__/dist/code/f124a850c3f703097b5494bd1efc77777c2efa4db1b6462c7952f47e82001a2f/code/Notion-Voice-Notes.mjs:1967:23) at null.executeComponent (/var/task/launch_worker.js:267:22) at MessagePort.messageHandler (/var/task/launch_worker.js:764:28)
05/01/2024, 17:28:56 - Attempting to clean up the /tmp/ directory...
05/01/2024, 17:28:56 - File tmpSample Audio File.mp3 does not exist.
05/01/2024, 17:28:56 - Directory does not exist. 

I tried following the error message to solve the issue (basically rerun whole workflow at once after finishing the setup to make sure that the temporary files are nor deleted in between steps) without luck. I'm not familiar with the code, but at least on the second to last log it says that "File tmpSample Audio File.mp3 does not exist.", could it be that the implementation of the automation is removing the forward slash ( / ) on the tmp folder? Base on the message it seems like it's trying to find a file with that name, rather than going inside the tmp folder and from there pick the file. My other guess based on the little details of the logs is that, since the file has white spaces, it has issues parsing the name into a real file.

Let me know if you need more information to reproduce this error, as I'm very eager to start using this cool new feature.

Jose-agg commented 6 months ago

To make it easier for whoever handles this issue, you can ignore the idea that the problem might be cause due to whitespaces - I tested it with a file with only one character "a.mp3" and it still failed.

Lukather commented 6 months ago

Same issue here with OneDrive, didn't tested Google or Dropbox one. image

boje commented 5 months ago

I have the same issue. I suspect that the "/" is causing the problem.

TomFrankly commented 5 months ago

Hey all, give me a day or so and I'll see what I can do about this!

TomFrankly commented 5 months ago

Should be fixed now. It was indeed the / character – which makes me very, very confused as to how OneDrive worked in my initial testing, as that part of the script didn't change in 0.7.7.

In any case, you can update like so: https://thomasjfrank.com/how-to-transcribe-audio-to-text-with-chatgpt-and-notion/#update - and please let me know if this doesnt' fix it!

boje commented 5 months ago

After the update, everything works perfectly.