I'm using ubuntu 10.10, and after making the mistake of installing LAMP, (was unable to connect to a database with it), I came here and read how important it is to use apt-get install python-mysqldb instead. Deleted LAMP, re-installed using apt-get, and am now getting the same error when trying to run a basic server_version.py script.

File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 129, in init
from converters import conversions

File "/usr/lib/pymodules/python2.6/MySQLdb/converters.py", line 165, in
from decimal import Decimal

File "/usr/lib/python2.6/decimal.py", line 137, in
import copy as _copy

File "/home/browning/copy.py", line 4, in

ValueError: need more than 1 value to unpack

Just trying to get some basic experience using databases with python here, so I'm not set on MySQL if there is a better option. I have attempted to re-install mysqldb multiple times using apt-get and pip.

1 Answer
1

It looks like you have a file named copy.py that is being picked up instead of the Python standard library module copy. Rename or delete your file (and copy.pyc if it was created). Or run from a different directory.