Re: Dictionary
Antonio Prado <antonio-m7WKv7+duuT/[email protected]> Tue, 04 May 2010 08:35:02 -0300
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Em Seg, 2010-05-03 às 22:53 +0200, dick escreveu: > Hi Antonio, > > May I suggest you take a look at SQLAlchemy? > > If you want to do anything serious with databases use something like that, > because it turns those rows in easy to handle objects and makes sure you can > REALLY work with it. > > my 2 cents..... > > Cheers Hi Dick, My database is integrated with a large desktop application and was not made following the criteria of SQLAlchemy, and would require a major change in their own application to work with him. In due course I will be implementing some application using the SQLAlchemy to know better. Cheers Antonio. > > Op donderdag 22 april 2010 21:29:18 schreef Tim Roberts: > > Antonio Prado wrote: > > > Em Qui, 2010-04-22 às 15:25 -0300, Antonio Prado escreveu: > > >> It worked, but in some cases this error that occurs: > > >>>>> expected string or Unicode object, NoneType found > > >> > > >> What is causing the error? > > > > We can't diagnose your issues unless you show us the actual code and the > > actual error message that was returned, along with the specific line > > where the error happened. None of us can read minds. > > > > > This code was created with the intention of returning type float instead > > > of type Decimal. > > > > > > What is wrong? > > > > > > > > > import psycopg2 > > > psycopg=psycopg2 > > > import psycopg2.extras > > > psycopg_extras = psycopg2.extras > > > > You can do those by saying > > import psycopg2 as psycopg > > import psycopg2.extras as psycopg_extras > > but I wonder why you don't just change the references in the program to > > match the real name. > > > > Do some of your records contain NULLs? I believe that would cause what > > you're seeing. > > > _______________________________________________ Psycopg mailing list [email protected] http://lists.initd.org/mailman/listinfo/psycopg