Re: Dictionary
dick <dickkniep-nI4mw7d/IixmR6Xm/[email protected]> Mon, 3 May 2010 22:53:22 +0200
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | Lindix |
| Message-ID | <[email protected]> |
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 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. > -- Met vriendelijke groet, Dick Kniep tel. 036-5343830 mob. 06-50991858 _______________________________________________ Psycopg mailing list [email protected] http://lists.initd.org/mailman/listinfo/psycopg