A thread-compatible interface to the popular MySQL database server that provides the Python database API.
0
votes
1answer
12 views
MySQL-python Failing to Install on Mac OSX Virtual Environment
I am having trouble installing MySQL-python on OSX (10.7) inside of a virtual environment with Django 1.5 installed.
I have an alternative virtual environment with Django 1.4 and I was previously ...
0
votes
2answers
20 views
Pipeline.py showing exception
I am building a small project in Scrapy and am new to Scrapy.
When I am running my spider, it shows an exception error in my pipeline which says:
item['Number'][0], exceptions.IndexError: list ...
3
votes
2answers
42 views
Some crazy code and crazy data. Insert rows in mysql db (python)
I'm trying to insert some data (stored in a list of tuples) to my local database. The data is a little inconsistent - some timestamps are datetime.datetime while some can be strings. But I don't think ...
1
vote
2answers
35 views
Update a MySQL table from an HTML table with thousands of rows
I have an html file on network which updates almost every minute with new rows in a table. At any point, the file contains close to 15000 rows I want to create a MySQL table with all data in the ...
0
votes
0answers
15 views
+250
python-mysqldb AGAIN Symbol not found: _mysql_affected_rows
Took me a days to get mysqldb working on Snow Leopard so this time round I did a completely clean install of the operating system and carefully followed the various instructions on installation to try ...
-1
votes
1answer
33 views
Installing Mysql-Python gives error [on hold]
I tried to install mysql-python using
pip install mysql-python
This is the error i got.
Please look into it
------------------------------------------------------------
/usr/local/bin/pip run on ...
0
votes
5answers
94 views
Python : TypeError: cannot concatenate 'str' and 'int' objects
How does Python know what is a string and what is an int ?
as far as it should be concerned it is a value being passed on to it.
this is the raw-mysql-query.
import time
zz = int(time.time())
...
0
votes
2answers
46 views
Python : How to break the python mysql query line
Currently what i have is..
cursor.execute ("insert into incoming set raw='" + f2 + "', from_em='"+ a2 +"', to2='" + a1 + "'")
i am trying to make this easy to read for myself.
so i tried to ...
1
vote
1answer
35 views
mysqldbcopy - Error 1045: Access denied for user 'root'@'localhost' (using password: NO)
i am using mysql workbench which has the command mysqldbcopy under linux. when i am trying to use it, i have to supply a connection string (see the examples here).
my password contains ampersand ...
0
votes
1answer
44 views
Error in installing mysqldb in python
I am trying to install mysql db in python, but i am unable to do so. I have installed set up tools and downloaded python mysqldb. when i am trying to do Setup.py install in command prompt it is ...
0
votes
3answers
33 views
cursor.fetchall() vs list(cursor) in Python
Both methods return a list of the returned items of the query, did I miss something here? or they have identical usages indeed? any differences performance wise?
0
votes
1answer
30 views
Python and MySQL mysterious memory leak
I'm running a python app that's querying (selecting) mysql db, reading ~1k rows at a time, performing calculations with them and repeating that for hours. Table which is read have ~20m readings and ...
1
vote
1answer
21 views
Django and Connector/Python Integration
How can I setup a Django 1.5.1 app running with Python 3.3 to access a MySQL database? I tried using MySQLdb but apparently it doesn't support Python 3.3.
My next intention was to use ...
0
votes
0answers
11 views
Python MySQLdb- using multiple database tables in query
I am writing a script in Python and I am using MySQLdb package.
con1 = mdb.connect('127.0.0.1', 'root', '', 'teacher')
con2 = mdb.connect('127.0.0.1', 'root', '', 'student', true)
I can ...
0
votes
1answer
39 views
Python : What's wrong with my code of multi processes inserting to MySQL?
I've write a Python script to insert some data(300 millions) to a MySQL table:
#!/usr/bin/python
import os
import MySQLdb
from multiprocessing import Pool
class DB(object):
def __init__(self):
...