Tagged Questions
0
votes
1answer
12 views
Django, South: I get a warning with key length while indexing
I had this in my models.py
category = models.CharField(max_length=1024, null=False)
I changed it to this:
category = models.CharField(max_length=256, null=False)
and migrated successfully.
and ...
0
votes
2answers
3k views
How connect to mysql with python via odbc
Im running mysql, pyodbc, python 2.7 loaded on Fedora 14 x64.
Odbcinst.ini is:
# Example driver definitions
# Driver from the postgresql-odbc package
# Setup from the unixODBC package
...
0
votes
2answers
20 views
Stress test on Django makes it slow while there are free system resources
Today I was doing a stress test to a new Django (1.5.4) running on an Ubuntu Server 12.04 site before going into production and I've found some unexpected results:
Doing 50 requests per second, htop ...
0
votes
0answers
19 views
Execute .py File From C# With Arguments
So for a recent project I am required to use Python, C#, and MySQL, this is not a debatable thing, it is the requirements.
I currently have a Python file that needs to be executed, and have input ...
0
votes
1answer
10 views
How to define an unsigned integer in SQLAlchemy
I am migrating a portal to Flask with Flask-SQLAlchemy (MySQL). Below is the code I used to create my DB for my existing portal:
Users = """CREATE TABLE Users(
id INT UNSIGNED ...
0
votes
0answers
5 views
RDS MySQL Ingoring Django only() Restrictions
Why would there be a difference between a Django query executed on an Amazon MySQL RDS instance and a vanilla MySQL database running on Ubuntu?
I have a rather large Django model, whose admin ...
0
votes
2answers
37 views
What is the best way to search millions of JSON files?
I've very recently picked up programming in Python and am working on creating a database.
I've already worked out extracting all these files from their source so they are all in a directory on my ...
0
votes
3answers
38 views
How to store python dictionary in to mysql DB through python
I am trying to store the the following dictionary in to mysql DB by converting the dictionary in to string and then trying to insert but I am getting following error.How to solve this or is any other ...
-1
votes
0answers
22 views
how to extract where part in sql using re in python?
Here is the scenario:
I want to retrieve the where part accurately in a SQL using python. For sql like this:
str = """
select "where" , count(*) as cnt from cdo_oplog
where pt < '#{end_time}' ...
0
votes
0answers
13 views
PyMySQL install permission denied
I have Python 2.7, Mysql 5.6 and Mac OSX 10.9, which are all running fine on their own.
I am just wanting to allow python to access my mysql tables (and I am very new at this, so be gentle).
I am ...
0
votes
1answer
28 views
What is wrong with my MySQLdb module for python?
I have installed MySQL for python, but am not quite sure if it worked. I went on python and typed:
import MySQLdb
and the error displayed was:
>>> import MySQLdb
Traceback (most recent ...
0
votes
0answers
9 views
Does MySQLdb Cursors not support empty iterator?
cur.executemany(sql, rows)
I have rows as empty iterator, it triggers an error.
If I do cur.executemany(sql, list(rows)) then it works fine.
File ...
0
votes
0answers
19 views
Doesnt print result of mysql query using Python 2.7
I have a query that looks like this, there are some instances that it will print just fine and sometimes it will not. I optimized my mysql server because sometimes a warning occurs: "Mysql got away, ...
0
votes
1answer
29 views
Python: Converting MySQL datetime to datetime for format
Bit of a newbie here.
I have a program which takes results from a MySQL database.
It picks out the fields Id and ship_date, the query searches only for returned records based on a given Id.
The ...
0
votes
1answer
26 views
Import of .csv file from linux to windows MYSQl
I need a shell script that must import latest ".csv" file into mysql...
My case is--->i need to import the latest ".csv" file from linux to windows mysql i.e my ".csv" files will be stored in a path ...