<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<font style="font-size:10pt" color="#1F497D" face="Arial" size="2"><br id="ecxFontBreak"></font>In my pc, through python, mod_wsgi, sqlalchemy as well as proxy.cgi script in /var/www/cgi-bin/ dir with localhost in AllowedHosts, I'm doing queries in my postgis database. With this code I want to retrieve data in geojson format and then displayed it in openlayers:<br><br>protocol: new OpenLayers.Protocol.HTTP(<br>                {<br>                        url: '/cgi-bin/proxy.cgi?url=http://localhost/mop/py/test3.py',<br>                        format: new OpenLayers.Format.GeoJSON()<br>                }<br>                ),<br><br>in firebug, I'm getting the query (as well as if I write in firefox http://localhost/mop/py/test3.py) and this error message:<br><br><div role="listitem" class="errorTitle focusRow subLogRow "><span class="errorMessage ">JSON.parse: unexpected character</span></div><span class=" "></span><table class=" " cellpadding="0" cellspacing="0"><tbody class=" "><tr class=" "><td class=" "><img src="chrome://firebug/content/blank.gif" role="checkbox" title="Break On This Error" class="errorBreak a11yFocus "></td><td class=" "><a class="errorSource a11yFocus "><pre title="object = JSON.parse(json, filter);" class="errorSourceCode ">object = JSON.parse(json, filter);</pre></a></td></tr></tbody></table><br>what does this mean? my idea at first was to get into my postgis database through a model, which is:<br><br>from sqlalchemy import *<br>from sqlalchemy import create_engine, MetaData, Table<br>from sqlalchemy.orm import *<br>from sqlalchemy.orm import mapper, relation, backref, sessionmaker<br>from sqlalchemy.ext.declarative import declarative_base<br><br># Setup the url, database engine and session<br>url = 'postgresql+psycopg2://postgres:pass@localhost:5432/mop'<br>engine = create_engine(url, echo=True)<br>Session = sessionmaker(bind=engine)<br>session = Session()<br><br># Setup the declarative extension and metadata<br>metadata = MetaData(engine)<br>Base = declarative_base(metadata=metadata)<br><br># Define the model classes<br>class Boreholes(Base):<br>        __tablename__ = 'boreholes_point_wgs84'<br>        __table_args__ = {'autoload':True}<br><br># DDL Extensions for geometry specific DDL<br>GeometryDDL(Boreholes.__table__)<br><br>but pointing that url doesn't work, I think I need something in between that will allow me to display the info in my postgis database and then through openlayers extract the data as geojson to plot it in my map.<br><br>Any hint is appreciated,<br><br>Regards,<br><br>Gery<br><br><font style="font-size:12pt" color="#1F497D" face="Arial" size="3"><br></font><br>                                         </div></body>
</html>