Tagged Questions
0
votes
3answers
1k views
Problem with Django syncdb on Amazon EC2
I'm trying to deploy my project on my EC2 instance.
When I run python manage.py validate I get this error Error: No module named mysql.base
.
I have already installed MySQL-python using yum install ...
5
votes
2answers
4k views
Django on CentOS
I'm looking to use Django on a shared host that's running an unknown version of CentOS. My main problem is trying to interface with a database. The server has MySQL installed, but not MySQL-python. I ...
2
votes
2answers
2k views
Django + OsX Lion + Mysql with XAMPP
I have the following on my MacBook with Osx Lion:
Mysql running with xampp (http://www.apachefriends.org/it/xampp.html)
Django 1.3 running in a virtualenv
I installed Mysql-python with pip install ...
1
vote
2answers
219 views
Countries: A list of their state/province and cities list
I want to get all the countries, their states/province and cities in the world.
Where can I find this information?
Somebody please help me. I have searched many times, but I couldn't find it ...
0
votes
2answers
6k views
warning :data truncated for column 'username' at row 1 when using database mysql with django
I am getting the above mentioned warning
data truncated for column 'username' at row 1
I am getting this for my model "suserprofile" with "username" as my first listed field ...
0
votes
2answers
1k views
Pycharm Django Syncdb MySQLdb not found
I've started using Pycharms for my django development and have come to this error. I know that my MySQLdb is working as I can import it when I go into the python shell and I can run syncdb commands on ...
5
votes
1answer
2k views
Mysql + django exception: “Commands out of sync; you can't run this command now”
Running django via gunicorn to RDS (AWS mysql), I'm seeing this error in my gunicorn logs:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") ...
2
votes
1answer
27 views
celery always have 3 processes,why?
I run the crawler application with celery(version 3.1) tasks and django(version 1.6.5. using its orm).And the command is :
celery -A crawlerproj worker -P gevent -c 1000 -l info
by using the 'htop' ...
2
votes
1answer
126 views
How can I detect total MySQL server death from Python?
I've been doing some HA testing of our database and in my simulation of server death I've found an issue.
My test uses Django and does this:
Connect to the database
Do a query
Pull out the network ...
1
vote
1answer
150 views
MySQLdb on MAC OS 10.6.8
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ...
1
vote
1answer
117 views
Unicode charactered filename SELECT SQL parameter issue
I have a webapp/webservice method created in django, which stores unicode character filenames on a DB-table. I am doing it by this method on the views.py script:
SubmissionContents(id=subid, ...
1
vote
1answer
346 views
clang error when installing MYSQL-python on Lion-mountain (Mac OS X 10.8)
When I try installing mysql-python using below command,
macbook-user$ sudo pip install MYSQL-python
I get these messages:
...
1
vote
1answer
1k views
locate libmysqlclient_r.so.16 issue
Like to start off by advising that i am a novice and my webdesigner is out of the country. I have the issue below and looking for some advice. I have already re-installed mysqldb and upgraded the ...
1
vote
1answer
554 views
Django Dev Environment Broken Following Mac OS 10.7 Reinstall
I recently experienced trouble with my hard drive and used Disk Utilities to reinstall Mac OS 10.7 Lion.
When I went to run my Django app, I got the following errors:
################ BEGIN ERRORS ...
0
votes
1answer
59 views
memory leak - gunicorn + django + mysqldb
I have memory leak in my gunicorn + django 1.5.1 + mysqldb.
I start to explore my code with gc and objgraph
when gunicorn worker became over 300mb i collected some stats:
data['sum_leak'] = ...
0
votes
1answer
94 views
Convert data stored in latin1 to utf-8
I want to convert a latin1 data to utf-8.
models.py
class old_product(models.Model):
product_description = models.CharField(max_length=200) # This field is latin1
class product(models.Model):
...
0
votes
1answer
46 views
Django mysql error in ubuntu
I have started to learn django and python and also I am new in using ubuntu. for my first program I need mysql so I already have installed it and when I use mysql command I have this result.
...
0
votes
1answer
198 views
Getting empty 'Ssl_cipher' with MySQLdb SSL connection to Amazon RDS
I've just spent a week on the problems recorded in this question: Why does the CA information need to be in a tuple for MySQLdb?
Have now boiled it down to one problem. Here's a script that connects ...
0
votes
1answer
144 views
Django1.6, will transaction works for raw SQL?
Examples from offical document
from django.db import connection
def my_custom_sql(self):
cursor = connection.cursor()
cursor.execute("UPDATE bar SET foo = 1 WHERE baz = %s", [self.baz])
...
0
votes
1answer
84 views
MySQL and virtual environment
I have MySQL installed on Mac, but when I use virtual environment to create a Django project , it seems like it cannot find the MySQLdb, is it because I dont have MySQL and MySQLdb inside the created ...
0
votes
1answer
79 views
How do I remove a python egg?
This post (How to install MySQLdb (Python data access library to MySQL) on Mac OS X?) recommends cleaning up a MySQLdb installation by removing a python egg:
"Step 3c: Remove the egg under ...
0
votes
1answer
111 views
Generate SQL Insert statements for SQLite with Django
I want to generate a complete SQL file with Django that can be downloaded and executed to create a SQLite DB.
The problem is escaping the strings to insert them into the file to download. This is ...
0
votes
1answer
577 views
Installing MySQLdb 1.2.3 with Python For Django on Mac OSX?
I am a beginner Java developer and newbie to Python and I want to install Django and from what i understood that i need to install MySQLdb 1.2.3 with Python and I have MySQL already installed so I am ...
-1
votes
1answer
266 views
django mysql connector wsgi
I am tring to move django site under apache on linux. I set vhost pointing to my site to file wsgi.py. That works fine. I am using virtualenv to set my enveronment (only one python site). The problem ...
-1
votes
1answer
50 views
Mysql access remotely
I have deployed one django application on live IP adress Backend is Mysql running on the same IP.
There is pythoncard(GUI) application installed on some another DNS/Gateway.
I am getting 2003 can't ...
-1
votes
1answer
523 views
Django on Mac OS X requires install of MySQLdb
I tried setting up Django to use a MySQL database and it choked because the backend was not available. Reading around the net I see that MySQLdb needs to be installed, and perhaps _mysql needs to be ...
1
vote
0answers
83 views
'MySQL server has gone away' on Django 1.6.5
I am running Django 1.6.5 with mysql (5.6.17).
Have the following DB settings in Django:
DATABASES = {
'default': {
'ENGINE' : 'django.db.backends.mysql',
'NAME' : ...
1
vote
0answers
681 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 ...
0
votes
0answers
16 views
Django forcing UTF-8 on misconfigured MySQL Server
I am using the MySQL-Python driver v1.2.5 with Python 2.7.x and Django 1.5.x.
I have a situation where I require a Django application to work entirely in UTF-8, yet the production MySQL server is ...
0
votes
0answers
129 views
DLL error creating first Django app
I'm getting a strange error when I try 'python manage.py runserver'
(env) C:\django\new_project\mysite>python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 8, in ...
0
votes
0answers
78 views
Failed to save a record in django: invalid literal for int () With base 10: 'Auto'
I have a problem saving my record in the database, my model is:
class people(model.Models):
full_name = models.CharField(max_length=240)
born_date = models.DateField()
country = ...
0
votes
0answers
220 views
Hook available for automatic retry after deadlock in django and mysql setup
I am using innoDB table in Django with mysql database. During investigation of error
OperationalError: (1213, 'Deadlock found when trying to get lock; try restarting transaction')
I came across ...
0
votes
0answers
369 views
MySQLdb not running on Mac 10.7
I am trying to install MySQL-Python (MySQLdb) locally on my Mac and I am having trouble. I have been working on this for HOURS and I continue to get this error:
>>> import MySQLdb
...