0

I inherited maintaining a site that uses the Miso Project to read data from a google spreadsheet. However, it currently isn't connecting. It seems the Miso Project documentation page is no longer up. Does anyone have a copy of the documentation or suggestions for what might be going wrong?

The code for the site worked about a year ago, but I had to recreate the sheet that is accessing.

Here are some facts/things I have tried:

  • I am including a locally saved copy of miso.ds.deps.min.0.4.1.js
  • I set sheet's permission is viewable to anyone with the link
  • I tried changing the worksheet parameter from "1" to "Sheet1"

Using the following code, the error is always thrown.

var ds = new Miso.Dataset({
     key: "1wHow46zTuzCA7veIUnq7K2GU5O3VHzuYsuvW2KocWBQ",
     worksheet : "1",
     importer: Miso.Dataset.Importers.GoogleSpreadsheet,
     parser : Miso.Dataset.Parsers.GoogleSpreadsheet
});
ds.fetch({
    success : function() {
        ... do stuff to the data...
    },
     error : function() {
     // error callback
     console.log("Error in reading data!");
     }
});
JMers
  • 175
  • 8
  • https://stackoverflow.com/a/24291285 Seems it hasn't been working since 2014 Kinda hopeless and pointless to make it work now. – TheMaster Oct 03 '18 at 00:55
  • Because we have a local copy of the js lib (miso.ds.deps.min.0.4.1.js), it was working for us in 2017. When the last developer left, a few things ended up getting deleted that I just need to recreate. If I can get my hands on the API/documentation, I don't think it's hopeless. – JMers Oct 03 '18 at 20:19
  • update: by passing an 'e' in the error function, I was able to get a more descriptive error message, which gave an idea as to the problem. `error : function(e) { // your error callback here! console.log("Error in reading data!!"); console.log(e); }` – JMers Oct 04 '18 at 05:30
  • @JMers Sorry, I didn't notice your update until today. How are things going with the Miso project? The error that you described isn't that helpful, is it ;) I've had a look at the Miso material on Github. The code above is from Miso, so actually the challenge isn't in Google, it is in the javascript. Anyway. let me know if you're still plodding away. – Tedinoz Oct 14 '18 at 03:44
  • @Tedinoz, yes, thanks, I succeeded! I found some documentation told me to use "od6" as the worksheet parameter instead of 1. Since the older version of this project used a file with multiple tabs it used '1' as the worksheet parameter . The file I am using only has data on one tab, thus needed to use "od6". Not hopeless after all. :) – JMers Oct 14 '18 at 04:18
  • @Jmers Crikey. That's so obscure! But glad to know things have been successful. You should consider answering your own question on StackOverflow just so that anyone coming along in the future will be sure to see your solution. – Tedinoz Oct 14 '18 at 04:25

1 Answers1

0

My particular issue was the worksheet parameter. I found some documentation about accessing google sheets data as JSON objects, that told me to use "od6" as the worksheet parameter instead of 1. Yes, that some google weirdness right there.

var ds = new Miso.Dataset({
     key: "1wHow46zTuzCA7veIUnq7K2GU5O3VHzuYsuvW2KocWBQ",
     worksheet : "od6",
     importer: Miso.Dataset.Importers.GoogleSpreadsheet,
     parser : Miso.Dataset.Parsers.GoogleSpreadsheet
});
JMers
  • 175
  • 8