0
votes
2answers
15 views

Can't get MySQLDb to work in python on Mac is there other easier DB?

I am looking for a production database to use with python/django for web development. Could someone give me some advice? I've been using sqlite3 with python for web development. And now, I want to ...
0
votes
1answer
48 views

Which database to use with Django and Python 3? [on hold]

I'm writing my first application with Django and Python 3.3.3. I've always used MySQL for others projects, but it seems to have some problems with Python 3.X and MySQL : At the time of writing, ...
1
vote
2answers
25 views

how to secure mysql connection using python

I'm writing python script which uses a mysql db. I want to secure mysql connection and the database will not be accessible to local user . Is there a good way to product this? #!/usr/bin/python ...
0
votes
0answers
16 views

MySQLdb vs python-mysql_connector [on hold]

I recently came across mysql-connector for python. Having used mysqldb previously, I was wondering what difference does mysql-connector possess when compared to mysqldb. Is there any difference in ...
0
votes
0answers
25 views

Web User Profiling using Python [on hold]

I want to develop an application, which will generate user profiles based on web serer access log analysis. This profiling will be based on IP address, user-agent string etc. After generating the ...
0
votes
1answer
20 views

Everything works but not adding data to mysql database

I'm trying to add some data to my database. Code works good without error. But when i'm checking my database i see that there is nothing new. Where is error? import MySQLdb as mdb con = #connection ...
1
vote
1answer
26 views

Periodic OperationalError: (2006, 'MySQL server has gone away')

I am hosting a web app at pythonanywhere.com and experiencing a strange problem. Every half-hour or so I am getting the OperationalError: (2006, 'MySQL server has gone away'). However, if I resave my ...
0
votes
2answers
23 views

How can be datetime formatted for mysql?

I want to send date and time from python to mysql. Type of variable in MySQL is datetime. I used year-month-day hour:minutes:seconds, but when i'm compiling it gives error after space (where time part ...
1
vote
1answer
17 views

python mysql multi-row insert fail

i'm just trying to insert data into a small mysql (innodb) table i made for testing. the single row insert works: cursor.execute("insert into testy (one, two) values (%s,%s)", ('00','01')) but ...
0
votes
1answer
22 views

Form can't insert items in MySQL using Python

I'm researching in several forums but can't find the issue in a simple form to insert information in a MySQL database. Can you find the error? Thanks Here's the HTML form code (hello.html): ...
0
votes
1answer
47 views

MySqlDb python, syntax error, can not understand

I have this query self.cursor.execute("""INSERT IGNORE INTO groups ( name, ...
1
vote
1answer
22 views

How to force django to save immediately instead of doing a batch update after loop

I have this django views.py method that aims to insert many data into the db. It loops through arrays of models and, if an object isn't already on the db, it gets inserted. This is what the code ...
0
votes
1answer
26 views

Make a MySQL Connection Over a Proxy

We have a Python script that writes values to a local database. We need to move this database to a remote host that requires the connection come from a white-listed IP address, which we have to set ...
1
vote
0answers
40 views

Django, Truncated incorrect DOUBLE value: '\x00' in ValueQuerySet

When I tried to run the following code, I get the error: Django, Truncated incorrect DOUBLE value: '\x00' I googled and read the solution for this issue I am not able to resolve my issue. I am using ...
-1
votes
2answers
38 views

crawl using scrapy and put the data into an existing mysql database [on hold]

What i want to do is to crawl a few stuff from a website and put it into an already created table. I am using mysql and Scrapy for crawling. any help?
0
votes
1answer
15 views

pymysql only detecting changes made externally after instantiating a new connection

I'm trying to run a Python script which leaves a connection open permanently, and responds to changes made outside of the script. So for example: Data script: Accepts form posts and commits form ...
0
votes
2answers
38 views

How to prevent duplicate entries in model from django admin

I have an application having a model called Verifications. It has fields like: asset_code, Status, Location, Emp_id etc. I can add verifications using "Add Verification" from django admin panel. But I ...
0
votes
1answer
45 views

Attribute Error Object has no attribute cleaned_data

my views.py cod: def update_details(request): if request.method == "POST": form = UpdateDetailsForm(request.POST) if form.is_valid: ...
1
vote
1answer
40 views

Only part of long string is written to database with pandas write_frame

I'm writing a pandas DataFrame to a MySql database. Following is how it displays on the screen. IP Agent 0 108.225.156.214 Mozilla/5.0 ...
0
votes
0answers
27 views

Special Characters and Encoding

Although there are hundreds of questions of this kind, there isn't an appropriate answer helping me to understand and solve my problem. I wanted to switch from a SQLite database to a MySQL database ...
2
votes
2answers
35 views

Play Framework and Python

I'm playing around with the Play Framework 2.0 and what I'm doing is a simple web app that does following : Ask user to input a message which gets stored to a database and displayed on the screen ...
0
votes
1answer
32 views

Updating a single column in a table for some certain range of rows using django form

I have an application with a model verification. I get data from user in this model with one null column. I want to update that particular null column later. I want to update the column for a range of ...
0
votes
1answer
29 views

Speeding up SQLite3 UPDATE function using CSV file

Due to the limitations of SQLite 3.7.13 updating columns on a JOIN, I created the following Python script to help with problem. Though due to the amount of data I am working with, I am running into ...
0
votes
1answer
31 views

How to update a single column in a subset of database table records using Django form or ModelForm?

I have a django application core. It have a model verification which stores records with 8 columns. I get each row in database records with one null column. I want to update this null column for a ...
0
votes
0answers
20 views

Unicode characters decoded in different format on MySQL and Python

I have a string with unicode character in a csv file. Plants vs. Zombies䋢 2 I'm retrieving this string using a CSV reader as csv_in = open(sourceCsvLocation, 'rU') csv_in.seek(0) myreader = ...
2
votes
1answer
29 views

pymysql and writing a pandas dataframe back to MySQL

I am in Python and have a Pandas dataframe called Office_RX. I am connected to mysql via pymysql. conn = pymysql.connect(host='127....', port=3306, user='root', passwd='', db='ABCD') c = ...
-3
votes
2answers
69 views

Co-occurrence graph from 8 million rows of data [closed]

I have 8 million unique user_id to item_id pairings that look like this: user_id item_id 1 item10 1 item11 1 item12 1 item13 2 item11 2 ...
0
votes
0answers
19 views

python mysql connect failure returns type 'exceptions.NameError'

I am trying to connect to mysql in python using the script db1= MySQLdb.connect("localhost","root","xxxx","vx_info") It raises the exception "type 'exceptions.NameError'" Would anyone help me to ...
0
votes
3answers
32 views

Secure MySQL Connection in Python

I have a MYSQL database with users table, and I want to make a python application which allows me to login to that database with the IP, pass, username and everything hidden. The thing is, the only IP ...
0
votes
0answers
30 views

newbies issue on installing django with mysql

Trying out for the first time pythons django I'm facing the following problem. I have bee deploying with apache wsgi and using the git trunk installed under /var/tmp/django-trunk. Than I was creating ...
0
votes
1answer
35 views

Using data from a website, match it to a table and pull data

After hours and hours of looking around and reading documents, I have to call for help and sanity. I'm no python expert or even HTML expert, so I'd appreciate every small bit of help that I can get. ...
0
votes
1answer
21 views

python mysql update function from tuple issue, I need your help again

I need your help again. I would like to update several 10th of entries in my database. My idea is as follows, unfortunately, I get the following error. I tried to convert to a string, but it does ...
0
votes
1answer
24 views

Django Models Counter

I am using Django with a bunch of models linked to a MySQL database. Every so often, my project needs to generate a new number (sequentially, although this is not important) that becomes an ID for ...
0
votes
1answer
37 views

Import log file content to MySQL database using Perl or Python

Hope you have some time to shed light on with my current problem. I have a log file from a program that runs in linux(Centos) that I want to export per line to MySQL Database. This is the log file ...
2
votes
1answer
36 views

Populate SQL table in Python depending on the existing attributes in the table

I have created a Table named UserEntry and have populated it with the tweet data. The table is below, so you can see the columns in the table c.execute("drop table if exists UserEntry") UserEntry = ...
0
votes
1answer
36 views

Matching dictionary values in a set of values using Python

I am reading 1000 tweets from a Web file wFD = urllib2.urlopen('http://rasinsrv07.cstcis.cti.depaul.edu/CSC455/Twitter_2013_11_12.txt') and then populating a table "TwTbl" with tweets(created_at, ...
0
votes
2answers
36 views

How to copy objects from the “default” DB to another DB with the same structure in Django

I have to migrate some data from one MySQL database to another one, both credentials are in the Django app settings file, accessible and everything is OK. My setting file is like this: DATABASES = { ...
1
vote
0answers
31 views

Bulk update with subquery using SQLAlchemy

I'm trying to implement the following MySQL query using SQLAlchemy. The table in question is nested set hierarchy. UPDATE category JOIN ( SELECT node.cat_id, ...
0
votes
1answer
20 views

python mysqldb update where variable where in list [duplicate]

I'm trying to update a field based on a variable where in list... urls = ["aaa", "bbb", "ccc", ...] (long list) time_now = time.strftime('%Y-%m-%d %H:%M:%S') UPDATE table SET updated_at=time_now ...
0
votes
1answer
26 views

Query run with Python doesn't perform unixtime function in MySQL

i am new to Python (second day of programming with it).I am connecting with a MySQL database and performing a simple query. The query is retrieved from an SQL file in the package directory. SQL Query ...
-2
votes
0answers
26 views

how can I store form data in a mysql database using python cgi

I have a web page with a form consisting of firstname, lastname new password and email. I need to make it so that any data entered on the form is stored in a mysql database that I set up. the DB is ...
0
votes
0answers
28 views

Python MySQL insertion error 1064

I'm writing a programme that will extract data from a text file and input that data in a MySQL database and I'm having a small problem with the insertion. Every time I run the programme, it seems to ...
0
votes
2answers
43 views

Python Scrapy - populate start_urls from mysql

I am trying to populate start_url with a SELECT from a MYSQL table using spider.py. When i run "scrapy runspider spider.py" i get no output, just that it finished with no error. I have tested the ...
1
vote
2answers
30 views

Creating an SQL query from a dictionary

I have a function to update an entry in a database (MySQL) and it needs to be as dynamic as possible. The function allows the user of the API to pass an id of a record and then kwargs to handle the ...
0
votes
1answer
23 views

Outerjoin in sqlalchemy

I'm new to databases and I'm practicing basic operations. I've set up mysql, python and sqlalchemy on my machine (huge victory). I've coded up this basic schema with Departments and Employees (I ...
0
votes
1answer
26 views

Executing multiple MySQL inserts at once in Python

I have a string that is basically a concatenation of multiple insert statements such as sql = INSERT INTO test (a,b,c) VALUES ("test","test",1);INSERT INTO test (a,b,c) VALUES ("2nd test","2nd ...
0
votes
2answers
36 views

python django race condition with celery

Working on a python django project, here is what I want: User access Page1 with object argument, function longFunction() of the object is triggered and passed to celery so the page can be returned ...
0
votes
0answers
27 views

Empty tables after running debug (Eclipse/Python)

so I checked out my (Django) code from the server, set my virtual environment and recovered the database from my production server. Everything looks up-to-date but when I run the debug from Eclipse ...
0
votes
0answers
38 views

paramiko is installed but mysql workbench saying “ImportError: No module named paramiko”

When i tried to open mysql workbench then it saying "ImportError: No module named paramiko; Operation failed: Cannot start SSH tunnel manager" although i have installed paramiko. I am using python ...
1
vote
2answers
48 views

How to query database without models Django?

I'm new to Python and Django, and I'm wondering how you would query the database without using a model. I have a table of ignored words, which consists of a primary key and a string of the word. How ...

15 30 50 per page