Oct-16-2017, 02:37 PM
Hello
I have installed the module psycopg2(pp psycopg2)
My program is having only one below statement
import psycopg2
When i try to execute, getting the below error.
===============
01.0
1003
102.0
Traceback (most recent call last):
File "/Users/agolakoti/Desktop/gak/python/dbConnect1.py", line 1, in <module>
import psycopg2
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/__init__.py", line 76, in <module>
from decimal import Decimal
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/decimal.py", line 3743, in <module>
_numbers.Number.register(Decimal)
AttributeError: 'module' object has no attribute 'Number'
===============
please guide me how to resolve the issue
I have installed the module psycopg2(pp psycopg2)
My program is having only one below statement
import psycopg2
When i try to execute, getting the below error.
===============
01.0
1003
102.0
Traceback (most recent call last):
File "/Users/agolakoti/Desktop/gak/python/dbConnect1.py", line 1, in <module>
import psycopg2
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/__init__.py", line 76, in <module>
from decimal import Decimal
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/decimal.py", line 3743, in <module>
_numbers.Number.register(Decimal)
AttributeError: 'module' object has no attribute 'Number'
===============
please guide me how to resolve the issue