Tagged Questions
3
votes
0answers
66 views
CREATE TRIGGER sys_exec and python
my python on /usr/esercizi/ is:
#!/usr/bin/python
import datetime
now = datetime.datetime.now()
aa = now.strftime("%Y-%d-%m %H:%M | %S")
out_file = open("/usr/esercizi/test.txt","w")
...
2
votes
0answers
66 views
Python/Django 1.5 DatabaseWrapper thread error
Throwing the following DatabaseError in Django 1.5.1 (and 1.5.0) and mysql when I runserver and attempt to load a local version of the web app:
DatabaseError at /
DatabaseWrapper objects ...
2
votes
0answers
119 views
MySQL Unread Result with Python
I use mysql.connector to do SQL operations.
I have a short scripts which executes the following operations (strings) on the cursor with cursor.execute(...):
"use {}".format(db)
"show tables"
...
2
votes
0answers
114 views
Mac: Eclipse error import MySQLdb works fine on command line
I have been trying to install Mysql and Python along with MySQLdb module on MAC. I have been able to do that successfully. From the command line when i do import MySQLdb it works fine. However, I ...
2
votes
0answers
148 views
Dynamic table names within MYSQL statement (Google Cloud SQL)
I am trying to drop/delete a table from within Google Cloud SQL using Python (App Engine) but I want the table name to be based on a variable, for simplicity I am using 'hello' here. For some reason ...
1
vote
0answers
48 views
Django with MySQL: DatabaseError (1406, “Data too long for column 'name' at row 1”)
I have a Django webapp, currently been testing with SQLite but now want to deploy and use MySQL, and I'm getting this error.
I am getting this error right when using python manage.py syncdb:
You ...
1
vote
0answers
66 views
Django's JSON and XML fixtures cause UnicodeEncodeError
I created a JSON file using Django's dumpdata command. When I import the data again with syncdb, Python throws an exception:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in ...
1
vote
0answers
86 views
Django: How to set foreign key checks to 0
Ok so i'm migrating database from sqlite to mysql , i had few errors but i already resolved them. Now i have problem with this option because i don't know how to disable it.
I tried
DATABASES = {
...
1
vote
0answers
27 views
Caching fully formed pages or individual elements of constantly changing data
It is viable to cache full user feeds similar to website like Twitter or Facebook, since they are usually constantly changing? Would the constant rewriting or expiring of the cache be worth the small ...
1
vote
0answers
127 views
Accessing a local MySQL instance in your GAE development environment for Python
Google Developer Relations team has been very nice to put together a lot of useful sample applications to illustrate how to develop applications on Google App Engine platform. Those examples did ...
1
vote
0answers
79 views
How to handle MySQL slave failover in python?
Is there a generally accepted way to handle MySQL slave db failover in python code?
Are there any good wrappers for SQLAlchemy connection pools (or other approaches) that are aware of replicas and ...
1
vote
0answers
69 views
Strange overhead from python function call
I have some strange overhead coming from nowhere. I'm running a python script and making some SQL queries using SQLAlchemy. Here is my problem:
def _create_connection(name):
connection = ...
1
vote
0answers
74 views
Is it possible that we can connect to multiple databases in django at one time
I am migrating some data from one database to another (db1 --> db2). The db1 is in a host and db2 is at another (so, the databases are in different hosts). I have to select data from db1 and insert ...
1
vote
0answers
34 views
What are the required options in order to enable djangodblog for error logging in a MySQL database?
I would like to ask a question about djangodblog used for logging real time Django exception into the application database. I use the following tools
Database: 5.5.28 MySQL Community Server
OS: ...
1
vote
0answers
133 views
error when trying to insert values into MySQL table with python
I'm trying to insert this row of data (i parse from a list of tuples)
(0L, u'2012-11-06T16:23:36-05:00', 0L, None, 23759918L, u'baseline', u'0 to 100', nan, 105114L, 2009524L, True, u'charge', ...