1
半年前,我發現一個腳本,它從Google表中卸載數據到trello。我經常使用它。谷歌spreedsheet腳本停止使用屬性對象
今天,它停止使用「數據倉庫錯誤」錯誤。 腳本誓與腳本的屬性的工作:
function checkControlValues(requireList, requireBoard) {
var col = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Настройка трелло").getRange("B3:B6").getValues();
var documentProperties = PropertiesService.getDocumentProperties();
var scriptProperties = PropertiesService.getScriptProperties();
var userProperties = PropertiesService.getUserProperties();
var appKey = col[0][0].toString().trim();
if(appKey == "") {
return "App Key not found";
}
scriptProperties.setProperty("appKey", appKey);
具體上線「scriptProperties.setProperty(」 APPKEY「的AppKey);」 即使您編寫了一個錯誤 scriptProperties.setProperty(「appKey」,「123123」);
Here is the log of the script:
[17-03-24 15: 35: 21: 837 EAT] Running ...
[17-03-24 15: 35: 21: 846 EAT] SpreadsheetApp.getActiveSpreadsheet() [0 seconds]
[17-03-24 15: 35: 21: 942 EAT] Spreadsheet.getSheetByName ([Thrallo Setting]) [0.095 sec.]
[17-03-24 15: 35: 22: 005 EAT] Sheet.getRange ([B3: B6]) [0.063 seconds]
[17-03-24 15: 35: 22: 061 EAT] Range.getValues () [0,055 seconds]
[17-03-24 15: 35: 22: 143 EAT] PropertiesService.getDocumentProperties() [0.08 seconds]
[17-03-24 15: 35: 22: 144 EAT] PropertiesService.getScriptProperties() [0 seconds]
[17-03-24 15: 35: 22: 145 EAT] PropertiesService.getUserProperties() [0 seconds]
[17-03-24 15: 35: 25: 913 EAT] Properties.setProperty ([appKey, XXXXXXXX]) [3,768 seconds]
[17-03-24 15: 35: 25: 924 EAT] Can not complete the completion in 4,069 seconds. Data warehouse error (line 268, export evaluation file for programming in a trello)
我會補充說,腳本停止工作立即在谷歌表堆,它在早些時候使用。
怎麼辦?
我會補充說,甚至出現從谷歌文檔(https://developers.google.com/apps-script/guides/properties)複製的代碼中的錯誤
上存儲性能的每一行產生相同的錯誤
// Set a property in each of the three property stores.
var scriptProperties = PropertiesService.getScriptProperties();
var userProperties = PropertiesService.getUserProperties();
var documentProperties = PropertiesService.getDocumentProperties();
scriptProperties.setProperty('SERVER_URL', 'http://www.example.com/');
userProperties.setProperty('DISPLAY_UNITS', 'metric');
documentProperties.setProperty('SOURCE_DATA_ID', '1234567890abcdefghijklmnopqrstuvwxyz');
To save data in bulk, pass a map of key-value pairs to Properties.setProperties(properties). Each key-value pair of the object in the parameter is stored as a separate property:
// Set multiple script properties in one call.
var scriptProperties = PropertiesService.getScriptProperties();
scriptProperties.setProperties({
'cow': 'moo',
'sheep': 'baa',
'chicken': 'cluck'
});
我有同樣的問題!由於這個原因,我的整個劇本停止了工作 – craftApprentice