Request timed out for visualization.Query

936 views
Skip to first unread message

Josh

unread,
Jul 5, 2008, 3:12:50 AM7/5/08
to Google Visualization API
I've read through this group as well as the documentation for the
Visualization API and I still cannot figure out why I am getting a
'request timed out' when I try to run this simple program.

The browser and OS don't seem to make a difference (I've tried Mac OS
Firefox 3.0, Win XP Pro Firefox 3.0, Win XP Server Firefox 2.0). Each
time I get this same error:

Error: missing } in XML expression
Source File: http://spreadsheets.google.com/pub?key=poAg-4S6PGg8xhw1OVp3YLA&pub=1&tqx=reqId%3A0
Line: 6, Column: 25
Source Code:
background-color: #ffdb69;


Here is the code I am using:

<html>
<head>
<script type="text/javascript" src="http://www.google.com/jsapi"></
script>
<script type="text/javascript">

google.load("visualization", "1");
google.setOnLoadCallback(initialize);

function initialize() {
var query = new google.visualization.Query('http://
spreadsheets.google.com/pub?key=poAg-4S6PGg8xhw1OVp3YLA&pub=1');
query.send(handleQueryResponse);
}

function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}

var data = response.getDataTable();

var table = new
google.visualization.Table(document.getElementById('table_div'));
table.draw(data, {showRowNumber: true});
}

</script>
</head>
<body>
<div id="table_div"></div>
</body>
</html>

Any thoughts? Thanks.

trollswagen

unread,
Jul 5, 2008, 1:26:21 PM7/5/08
to Google Visualization API
it seems you are using the url for the actual spreadsheet. that's why
you are getting the error, its trying to interpret html content, but
its expecting xml.

did you follow this step-by-step on how to get the data source url?
http://code.google.com/apis/visualization/documentation/reference.html#Query

i think your URL should be this one:
http://spreadsheets.google.com/tq?key=poAg-4S6PGg8xhw1OVp3YLA&pub=1&tqx=reqId%3A0


On Jul 5, 12:12 am, Josh <thez...@gmail.com> wrote:
> I've read through this group as well as the documentation for the
> Visualization API and I still cannot figure out why I am getting a
> 'request timed out' when I try to run this simple program.
>
> The browser and OS don't seem to make a difference (I've tried Mac OS
> Firefox 3.0, Win XP Pro Firefox 3.0, Win XP Server Firefox 2.0). Each
> time I get this same error:
>
> Error: missing } in XML expression
> Source File:http://spreadsheets.google.com/pub?key=poAg-4S6PGg8xhw1OVp3YLA&pub=1&...

Google VizGuy

unread,
Jul 6, 2008, 3:06:18 AM7/6/08
to google-visua...@googlegroups.com
This is indeed the problem, but do not use the tqx parameter, the url should be

http://spreadsheets.google.com/tq?key=poAg-4S6PGg8xhw1OVp3YLA&pub=1
Reply all
Reply to author
Forward
0 new messages