I have had some reports of DocsList errors from folks using the Google Docs Writing Tracker. This is because those functions have been deprecated. Several months ago, I updated the master branch with code that uses the newer DriveApp object model. I have been using that code for a few months with no errors. If you are seeing errors in the last few days caused by DocsList objects, I recommend you pull the latest version of the scripts. That should fix the problem. Please see the readme for additional details and instructions.
Subscribe by email
Join 4,212 other subscribers
Thanks! I’m sorry I was one of the people not paying attention to updates.
So, I am missing something. Pulling down the latest code errors off for needing a “Project Sheet”.
Is there an updated spreadsheet posted somewhere ?
It is possible I left some test code in by accident although I thought I pulled it all out. I’m about to get on a plane, but I will take a look at it tomorrow.
Jamie – thanks !! That fixed it..
Anyone else getting errors? I keep getting a getDailyWordCount error: ReferenceError: “DocsList” is not defined. (line 152, file “Code”)
I first did the scripts update for current users of the Writing Tracker (several iterations of that). Later I deleted ALL of the previous files and did a clean installation/setup as a new user. Every time, though, I get this same error.
My programmer boyfriend thinks it may be due to the lack of a variable definition (e.g., “var DocsList”) in the WritingStats Code.gs, so I may give that a try next. But I also wanted to check in here with the other Writing Tracker users to see if anyone else had experienced a similar problem.
Oh, geez. Never mind. This whole time I’d thought I’d been grabbing the new code, but I was just copying and pasting the old scripts over and over again. I feel so completely brilliant right now. 😉
I’m still seeing a single instance of DocsList in the updated WritingStats Code.gs, in line 530:
var doc2 = DocsList.getFileById(file.getId()).getContentAsString();
Should this still be in there?
Actually, the code should only ever run that line (530) if you are using plain text files instead of Google Documents. If the latter, line 530 should never execute… which is probably why some people are not seeing an error. I’ll still fix it, but that at least explains it.
You’re right. Comment out line 530. I’ll put a fix in when I have chance to remove that line entirely. Line 529 takes care of what 530 does. I think I just forgot to remove the line.
. . . And so that explains why I’m still getting errors, whether I comment-out line 530 or not.
I’m working in Scrivener and doing an auto-sync between folders with .txt files.
At least I’m learning more about coding. 😉