Hi!
I've been trying to access a google spreadsheet via processing. For I am not a programming expert I used blprnt's spreadsheetmanager for it, which can be found here.
Everything worked so far - until I tried to access quite a large spreadsheet. Its a "movement protocol" from a member of the german bundestag, it can be found here.
I tried the following:
It takes some time until I get the "RETRIEVED WORKSHEET Vorgang_ms_bereinigt.csv" message, which tells me that I'm somehow going in the right direction.
After 1-2 minutes I get an OutOfMemoryError in my Processing-Console, followed by lot of Exception-Texts (none of them in my code tho, see below).
Now I'm not sure if there is an error in blprnt's code or if the spreadsheet simply is to large. Thx a lot in advance^^
Error Text:
An OutOfMemoryError means that your code is either using up too much memory
because of a bug (e.g. creating an array that's too large, or unintentionally
loading thousands of images), or that your sketch may need more memory to run.
If your sketch uses a lot of memory (for instance if it loads a lot of data files)
you can increase the memory available to your sketch using the Preferences window.
Exception in thread "Animation Thread" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuilder.append(StringBuilder.java:119)
at com.google.gdata.util.XmlParser.startElement(Unknown Source)
at org.xml.sax.helpers.ParserAdapter.startElement(ParserAdapter.java:597)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:453)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
at com.google.gdata.util.XmlParser.parse(Unknown Source)
at com.google.gdata.util.XmlParser.parse(Unknown Source)
at com.google.gdata.data.BaseFeed.parseAtom(Unknown Source)
at com.google.gdata.data.BaseFeed.readFeed(Unknown Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at com.google.gdata.client.GoogleService.getFeed(Unknown Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at SpreadSheetSample$SimpleSpreadsheetManager.fetchSheetByKey(SpreadSheetSample.java:200)
at SpreadSheetSample.setup(SpreadSheetSample.java:71)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
I've been trying to access a google spreadsheet via processing. For I am not a programming expert I used blprnt's spreadsheetmanager for it, which can be found here.
Everything worked so far - until I tried to access quite a large spreadsheet. Its a "movement protocol" from a member of the german bundestag, it can be found here.
I tried the following:
- SimpleSpreadsheetManager sm;
-
void
setup() {
-
size(
500
,
500
);
-
background(
255
);
-
SimpleSpreadsheetManager sm =
new
SimpleSpreadsheetManager();
-
sm.init(
"myProjectName"
,
"me@myemail.com"
,
"mypassword"
);
-
sm.fetchSheetByKey("0An0YnoiCbFHGdGp3WnJkbE4xWTdDTVV0ZDlQeWZmSXc", 0);
- //get the value of the third cell in the first column (for testing)
- println(sm.getCellValue(0,2));
-
};
- void draw() {};
It takes some time until I get the "RETRIEVED WORKSHEET Vorgang_ms_bereinigt.csv" message, which tells me that I'm somehow going in the right direction.
After 1-2 minutes I get an OutOfMemoryError in my Processing-Console, followed by lot of Exception-Texts (none of them in my code tho, see below).
Now I'm not sure if there is an error in blprnt's code or if the spreadsheet simply is to large. Thx a lot in advance^^
Error Text:
An OutOfMemoryError means that your code is either using up too much memory
because of a bug (e.g. creating an array that's too large, or unintentionally
loading thousands of images), or that your sketch may need more memory to run.
If your sketch uses a lot of memory (for instance if it loads a lot of data files)
you can increase the memory available to your sketch using the Preferences window.
Exception in thread "Animation Thread" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuilder.append(StringBuilder.java:119)
at com.google.gdata.util.XmlParser.startElement(Unknown Source)
at org.xml.sax.helpers.ParserAdapter.startElement(ParserAdapter.java:597)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:453)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:179)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:377)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
at com.google.gdata.util.XmlParser.parse(Unknown Source)
at com.google.gdata.util.XmlParser.parse(Unknown Source)
at com.google.gdata.data.BaseFeed.parseAtom(Unknown Source)
at com.google.gdata.data.BaseFeed.readFeed(Unknown Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at com.google.gdata.client.GoogleService.getFeed(Unknown Source)
at com.google.gdata.client.Service.getFeed(Unknown Source)
at SpreadSheetSample$SimpleSpreadsheetManager.fetchSheetByKey(SpreadSheetSample.java:200)
at SpreadSheetSample.setup(SpreadSheetSample.java:71)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
1