Tagged Questions
1
vote
0answers
46 views
Django Unknown system variable 'TRANSACTION' on syncdb
My local Django is blowing up running the manage.py syncdb script that runs on our servers.
This is the error message I'm seeing when running python manage.py syncdb,
OperationalError: (1193, ...
1
vote
0answers
26 views
ImportError: No localization support for language 'eng' in python
i am getting ImportError: No localization support for language 'eng' when using MySQL Connector Python.
My Traceback is as below.
Traceback (most recent call last):
File \"DB_Module.py\", line 151, ...
1
vote
0answers
255 views
Twitter API getting follower ids for huge number, without getting error
[I am using Python, and ruby gem twurl to request with OAuth.]
I am trying to get follower ids from Twitter, for @BarackObama, who has 24,265,751 followers currently.
Mathematically, 24,265,751 ...
1
vote
0answers
140 views
install MySQLdb to run in Pydev on Mac OS X 10.8
I had been stuck in some incompatible conflicts while trying to install mysql-python in Mac OS X 10.8 for a few days. After looking at some forums I found the solution to force Python run in 32 bit ...
1
vote
0answers
125 views
Improve multithreading with network IO and database queries
I'm writing a script that:
fetch a list of urls from a db (about 10000 urls)
download all the pages and insert them into the db
parse the code
if(some condition) do other inserts into the db
I ...
1
vote
0answers
85 views
DB-API Type_Codes for Google Cloud Sql: Different from MySQLdb?
I'm finding that the type_codes returned by cursor.description from DB-API are different for Google Cloud SQL than a standard MySQLdb implementation. For example: in MySQLdb (mysqldb-python), ...
1
vote
0answers
615 views
WSGI: _mysql.so Image not found
Environment: MacBook Pro, OSX 10.6, Python 2.6.1 64 bit, MySQL 5.X 64 bit
I am having problems installing MySQLdb for use with Django. After installing everything I am able to open the python ...
1
vote
0answers
2k views
Using MySQL in Pydev Eclipse
I am trying to access a MySQL database with python through Pydev Eclipse. I have installed the necessary files to access MysQL from python and I can access the database only when I write code in ...
0
votes
0answers
25 views
Intellij not seeing python module MySQLdb
I have installed the python mysqldev
sudo apt-get install python-mysqldb
It is working on command line python. But IJ does not see it
File "/shared/git2/etl/appminer/hive/DB.py", line 7, in ...
0
votes
0answers
35 views
Simplifying Large SQL Prepared Statements in Python
I've made a Python script to insert some values from Excel Spreadsheets onto a mySQL database. I'm using mySQLdb and prepared statements. I am reading from multiple files with iterators, and each of ...
0
votes
0answers
24 views
Parameterized MySQLdb SELECT, 1241, 'Operand should contain 1 column(s)
Any ideas on why this is failing? I looked at other similar questions but the had ('s in their queries, this one is simple or I thought. Doesn't matter if I use a named parameter or sequential.
query ...
0
votes
0answers
47 views
Why do I get these errors “Data truncated for column”?
I use this string to upload my CSV file into a MySQL table.
Query = """ LOAD DATA LOCAL INFILE 'Data to file_name.csv' INTO TABLE table_name
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY ...
0
votes
0answers
21 views
Python MySQLdb returns a list of empty strings on a large query
The MySQL query I'm running returns 2,903,781 items in its result set.
When I do the query using MySQLdb in Python, and attempt to get back a list with fetchall(), I get a list that is the correct ...
0
votes
0answers
33 views
Cannot create cursor with MySQLdb
I am connecting to a database with the following code:
#generate connection to database
def connection():
return MySQLdb.connect(host = __HOST__,
user = __USER__,
...
0
votes
0answers
38 views
MySQLdb undefined - import MySQLdb
So I have this application called Openfreezer.
I have followed the instructions perfectly to make their web application work... and it does.
But now when I play around with it and it starts calling ...
0
votes
0answers
38 views
weakly-referenced object no longer exists error on creating a function
I am working with MySQL connector and Python 3.3. I am creating a script that consists of functions that frequently access database server. So for all the functions I have created, I am trying to ...
0
votes
0answers
44 views
MySQLdb return average of results
Its possible to return the average of selected data using MySQL, however I can't seem to do this using MySQLdb, my code is as follows
cursor = database.cursor()
cursor.execute ("SELECT AVG(points) ...
0
votes
0answers
78 views
Mysqldb installation ERROR - Python 2.7 NOT FOUND
I've installed Py 2.7.3 and now I want to install Mysqldb 1.2.4 using MySQL-python-1.2.4b4.win32-py2.7.exe. but there's an error: Python version 2.7 required,which was not found in you registry...
...
0
votes
0answers
610 views
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:
I am following the django tutorial, Many have asked the question but I think my situation is bit unique because after installing python-mysql I still get this error when I try to do python manage.py ...
0
votes
0answers
29 views
Influence of forking on existing mysql-connection
I have a server which is/should be able to handle a lot of connections at the same time.
Now sometimes I have an error: “Lost connection to MySQL server during query”. At the time I am fixing this ...
0
votes
0answers
40 views
Python+mysql: equivalent for Postgresql's copy_from?
The psycopg2 cursor copy_from function doesn't work with MySQLdb.
I there an equivalent for MySQLdb?
Code sample:
for table in buffers:
buf = buffers[table]
buf.seek(0)
...
0
votes
0answers
146 views
Django mysql cursor callproc with temporary table
I have multiple databases configured in my django projects settings.py
I need to use raw sql to call a stored procedure. I am using the following code snippet
from django.http import HttpResponse
...
0
votes
0answers
107 views
SSH Tunneling and MySQLdb
This seems like a very typical use case, but I just can't get it to work correctly. I have set up an ssh tunnel with:
ssh user@mySQLserver -NfL 3306:127.0.0.1:3306
I have no instance of mysqld on ...
0
votes
0answers
115 views
Cannot use/import MySQLdb in ipython notebook (works well in ipython qtconsole)
After great trouble with installing MySQLdb (due to incompatibility between 32-bit and 64-bit architectures) I have now run into another curious problem for which I cannot find the solution on the ...
0
votes
0answers
105 views
can't install python-mysql==1.2.3
Trying to setup mysql, django and GAE. Just finished installing mysql on my mac. However when doing
sudo easy_install mysql-python==1.2.3
or downloading mysql-python and changing the mysql_config ...
0
votes
0answers
100 views
MySQLdb Python vs Bash mysql client
When I run the following code, it takes a very long period of time. On the other hand if I implement the same in Bash, using command line mysql client, it goes 9 times faster.
Is something wrong with ...
0
votes
0answers
67 views
escaping special characters with mysqldb
I got the following which is supposed to read a config file and connect to a database/J'ai le code suivant qui lit un fichier de configuration en vue de se connecter a une database :
class ...
0
votes
0answers
102 views
Errors when running Foursquare connected app on google app engine
I have searched this site and I have googled and I've done everything that every site has told me to do. I'm getting the following errors even though I've installed everything. I have installed PIL ...
0
votes
0answers
58 views
Mysql for Python installation
When I install mysql for python, i am getting the below error. Can someone help on this ?
/PYINSTALL/MySQL-python-1.2.4b5]: python setup.py install
ld.so.1: python: fatal: relocation error: file ...
0
votes
0answers
188 views
Python and MySQLdb slow execute and fetchall
I have a problem with Python and MySQL, Im using MySQLdb 1.2.3 which I installed with a windows msi file and Python 2.7.3 on Windows 7 SP1 x64.
I have quite a big python file and Im making a website ...