Python Forum
database connectivity
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
database connectivity
#1
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
Reply
#2
What os?
what version of python?
SEE: https://python-forum.io/misc.php?action=help&hid=19
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020