ave-63 / attendant.r

Compiles Zoom meeting attendance reports
0 stars 0 forks source link

Error "there are no csv files" even though they are there #3

Closed jenlkov closed 2 years ago

jenlkov commented 2 years ago

I made sure I have the reports saved as .csv in the correct input folder (double checked it's the right path), but i get the error that there are no csv files in the folder image

ave-63 commented 2 years ago

Hey Jenna, I don't use windows, so it's gonna be tough for me to help debug this. But it seems like there's an issue with how you're passing the directories directly to rscript.exe. The error message should only be printing the INPUT_DIRECTORY but you're getting the output directory as part of that string too, which I think is causing the error. Have you tried editing do_attendance_win.bat, and running that, instead of running rscript.exe directly?

jenlkov commented 2 years ago

I did edit do_attendance_win.bat directly. And to try this run I've just been running that, not the rscript.exe. I double checked to make sure I didn't accidentally edit something wrong in the .bat file when I put in my directories, and I don't think I did. I redownloaded the attendant.r file, and I even tried to download the zoom csv files in a different way, and still got the same error. Here's what my .bat looks like when I open it in a text editor:

image

ave-63 commented 2 years ago

Hmm, OK. When you double click co_attendance_win.bat to run the script, does it give the same error as when you run rscript.exe directly? Specifically, does it print out both directories instead of one directory?

Also, you could just edit attendant.r like so and I think it will work. Just make the first few lines like so:

INPUT_DIRECTORY <- "C:\Users\blah\blah\input"
OUTPUT_DIRECTORY <- "C:\Users\blah\blah\output"
YEAR <- "2022"

Hopefully this works. If you know some R or are brave, you might be able to figure out how to tweak that if necessary.

jenlkov commented 2 years ago

I made that change you suggested to attendant.r, and that fixed that problem! Now I am having the same problem that was in your other "issues". I tried to follow that thread, and change the names to match what Zoom now puts as the headers in the csv. My name column header looks a little weird in R, but I just pasted the header name as it appears in R Studio when I view the csv file (ï..Name..Original.Name.). I did the same with the new name for the duration minutes column (Total.Duration..Minutes.) I still got this error: image

At the end of that other thread, you suggested a change to one of the last blocks (the block starting on line 94), and when I made those changes, this is the new error I get: image

I think I get this second problem because idf isn't defined until the block after it? It looks like idf is defined on row 112, at least that's where I see it. Is this in the right place? Am I editing in the wrong place? I swear I didn't move things around, just made some slight adjustments

ave-63 commented 2 years ago

I don't know how you could have gotten object 'idf' not found because the first place it shows up is in line 112 where it's defined. I double checked this with the version here on github. I'm guessing you accidentally copied and pasted something?

jenlkov commented 2 years ago

Ok I fixed the idf not found thing, and I also fixed the Duration.Minutes. not found error. I had defined it as "Duration.Minutes", without the last period at the end. SO that's fixed, but NOW I have another error. It's now having an issue with not finding "Name". I double checked that I wrote this one the same way it is later called, so I'm not sure why it's having this issue now. Sorry for all this, but thank you so much for your help! I'm only a bit familiar with R, so I'm not sure where to look to fix things like this. image

jenlkov commented 2 years ago

It works! I had to re-download each file because I had exported some from Zoom a bit differently and they had ended up with different column names. So I made sure they were all exported the same way so they would have the same exact column headers, and made sure those headers matched what was in the code for the Name and Duration Minutes variables. All fixed now! Thank you for all your help and for creating a really useful tool!