doesn't look like an error to me. It's just the result of your

print alldata

call. It depends on Postgis which attributes are available on the
Borehole instances, but you could use

print dir(alldata[0])

to get an idea about what is available.

On Wed, Aug 29, 2012 at 12:37 PM, Gery . <gameji...@hotmail.com> wrote:
>
> Hello,
>
> I'm quite new in SA and I'm having some problems with a script. After
> running the script, I'm getting this error:
>
> [<__main__.Boreholes object at 0xb7a2958c>, <__main__.Boreholes object at
> 0xb7a2962c>, <__main__.Boreholes object at 0xb7a2966c>, <__main__.Boreholes
> object at 0xb7a296cc>, <__main__.Boreholes object at 0xb7a2972c>,
> <__main__.Boreholes object at 0xb7a2978c>, <__main__.Boreholes object at
> 0xb7a297ec>, <__main__.Boreholes object at 0xb7a2984c>, <__main__.Boreholes
> object at 0xb7a298ac>, <__main__.Boreholes object at 0xb7a2990c>,
> <__main__.Boreholes object at 0xb7a2996c>, <__main__.Boreholes object at
> 0xb7a299cc>, <__main__.Boreholes object at 0xb7a29a2c>, <__main__.Boreholes
> object at 0xb7a29a8c>, <__main__.Boreholes object at 0xb7a29aec>,
> <__main__.Boreholes object at 0xb7a29b4c>, <__main__.Boreholes object at
> 0xb7a29bac>, <__main__.Boreholes object at 0xb7a29c2c>, <__main__.Boreholes
> object at 0xb7a29cac>, <__main__.Boreholes object at 0xb7a29d2c>,
> <__main__.Boreholes object at 0xb7a29dac>, <__main__.Boreholes object at
> 0xb7a29e2c>, <__main__.Boreholes object at 0xb7a29eac>, <__main__.Boreholes
> object at 0xb7a29f2c>, <__main__.Boreholes object at 0xb7a29fac>,
> <__main__.Boreholes object at 0xb7a3504c>, <__main__.Boreholes object at
> 0xb7a350cc>, <__main__.Boreholes object at 0xb7a3514c>, <__main__.Boreholes
> object at 0xb7a351cc>, <__main__.Boreholes object at 0xb7a3524c>,
> <__main__.Boreholes object at 0xb7a352cc>, <__main__.Boreholes object at
> 0xb7a3534c>, <__main__.Boreholes object at 0xb7a353cc>, <__main__.Boreholes
> object at 0xb7a3544c>, <__main__.Boreholes object at 0xb7a354cc>,
> <__main__.Boreholes object at 0xb7a3554c>, <__main__.Boreholes object at
> 0xb7a355cc>, <__main__.Boreholes object at 0xb7a3564c>, <__main__.Boreholes
> object at 0xb7a356cc>, <__main__.Boreholes object at 0xb7a3574c>,
> <__main__.Boreholes object at 0xb7a357cc>, <__main__.Boreholes object at
> 0xb7a3584c>, <__main__.Boreholes object at 0xb7a358cc>, <__main__.Boreholes
> object at 0xb7a3594c>, <__main__.Boreholes object at 0xb7a359cc>,
> <__main__.Boreholes object at 0xb7a35a4c>, <__main__.Boreholes object at
> 0xb7a35acc>, <__main__.Boreholes object at 0xb7a35b4c>, <__main__.Boreholes
> object at 0xb7a35bcc>, <__main__.Boreholes object at 0xb7a35c4c>,
> <__main__.Boreholes object at 0xb7a35ccc>]
>
>
> the script is here:
>
> *************************************************************************************************************
>
> # import things to be used
> from sqlalchemy import create_engine, MetaData, Table
> from sqlalchemy.orm import mapper, sessionmaker
>
> # connecting to database engine
> myengine = create_engine('postgresql://postgres:pass@localhost:5432/mop',
> echo=False)
>
> # MetaData: describing the database schema
> mymetadata = MetaData(myengine)
>
> # load existing tables in postgis database
> boreholes = Table('boreholes_point_wgs84', mymetadata, autoload=True)
>
> # defining empty classes to be mapped to existing tables
> class Boreholes(object):
>         pass
>
> # mapping empty classes to existing tables [ie. ORM]
> Boreholesmapper = mapper(Boreholes, boreholes)
>
> # session operations [finding data, adding data, modifying data and deleting
> data]
> Session = sessionmaker(bind=myengine)
> mysession = Session()
>
> # queries
> alldata = mysession.query(Boreholes).all()
> print alldata
>
> *************************************************************************************************************
>
> I'm working with python2.4 and SA 0.7.8 in rhel5 (32-bit).
>
> Any hint is appreciated,
>
> Best regards,
>
> Gery
>
>
>
>
>
>
>
> __________________________________________________________________________________________
> Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO
> es necesario.
> Think green - keep it on the screen. Do NOT print if it is NOT necessary.
> Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie
> NICHT, wenn es NICHT notwendig ist.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sqlalchemy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to