Re: Dictionary
Tim Roberts <[email protected]> Thu, 22 Apr 2010 12:29:18 -0700
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | Providenza & Boekelheide, Inc. |
| Message-ID | <[email protected]> |
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.
--
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.
_______________________________________________
Psycopg mailing list
[email protected]
http://lists.initd.org/mailman/listinfo/psycopg