Re: Easiest way to access MySQL from Django on Mac OS X?...
Chris, Good info. Thanks! I'm hearing lots of good things about Homebrew. If I go to a package manager, I may try it instead of MacPorts. For now, I've succeeded with just installing setuptools and MySQLdb, as described below, and not re-installing MySQL or Python. I installed MacPorts, but decided not to use it after doing a dry-run and seeing that it was planning to re-install a bunch of stuff that it doesn't know I already have installed and configured: MySQL, Python, etc. Seems like MacPorts is too intrusive if you don't use it from day one for all Mac installs. Homebrew would have the same problem, I guess, as do yum and apt-get on Linux. It's hard to start using any of them after a couple years of configuring the system manually because none of the packages you already installed are recorded in their records. I may start using Homebrew the next time I configure a Mac from scratch, just as I now do all of my Linux boxes via yum. For now, I did a manual install of Python setuptools, and then a manual install of the MySQLdb driver for Python. Everything's working fine. Turned out to be as easy as: - Download setuptools-0.6c11-py2.7.egg from http://pypi.python.org/pypi/setuptools/ % sh setuptools-0.6c11-py2.7.egg - Download MySQL-python-1.2.3.tar.gz from http://sourceforge.net/projects/mysql-python/ % gunzip MySQL-python-1.2.3.tar.gz % tar -xvf MySQL-python-1.2.3.tar % cd MySQL-python-1.2.3 % python setup.py build % sudo python setup.py install --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. On 9/23/12 11:03 PM, Chris Streeter wrote: When I'm setting up a new Mac OS system, the process I go through to install Python and MySQL. First, I install Python using this guide: http://docs.python-guide.org/en/latest/starting/install/osx/ The guide also installs Homebrew, which works great for me so far and is easily removable. After Python and Homebrew is installed, then you can install mysql with: brew install mysql This will get us the proper headers we need to install MySQLdb with pip. After MySQL is installed, you can install MySQLdb into a virtualenv or system-wide with a simple command: pip install MySQLdb Hope that helps, - Chris On Sun, Sep 23, 2012 at 6:54 PM, Andrew Macgregor mailto:and...@ccg.murdoch.edu.au>> wrote: Hi Fred, I've also found HomeBrew to be useful. Here's a good setup guide: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ Cheers, Andrew. On Monday, September 24, 2012 2:02:37 AM UTC+8, Fred Stluka wrote: Resolved this on my own. Here's what I did: - Downloaded and installed MacPorts, but decided not to use it because I have too much software already installed that MacPorts doesn't know about and wants to reinstall (MySQL, Python, OpenSSL, etc.) - Downloaded and installed Python setuptools and resumed the MySQLdb setup that I'd already begun (see my previous post appended below). It turned out to be easy: - Download setuptools-0.6c11-py2.7.egg from http://pypi.python.org/pypi/setuptools/ % sh setuptools-0.6c11-py2.7.egg % cd MySQL-python-1.2.3 % python setup.py build % sudo python setup.py install Success! Now I can access MySQL from my Python/Django apps. BTW, I also downloaded and installed PyCharm. Nice Python IDE! --Fred Fred Stluka -- mailt...@bristle.com -- http://bristle.com/~fred/ <http://bristle.com/%7Efred/> Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. On 9/22/12 5:28 PM, Fred Stluka wrote: Django users, What's the latest on the easiest way to access MySQL from Django on Mac OS X 10.6.8 (Snow Leopard)? I've Googled lots of info, but some may be outdated. Seems to be more complicated than it should be, especially since everything else to do with Django has been so easy. Here's what I've done and learned: - Followed MYSQLdb link in Django docs: https://docs.djangoproject.com/en/1.4/topics/install/#database-installation to: http://sourceforge.net/projects/mysql-python/
Re: Easiest way to access MySQL from Django on Mac OS X?...
Andrew, Good info. Thanks! I'm hearing lots of good things about Homebrew. If I go to a package manager, I may try it instead of MacPorts. For now, I've succeeded with just installing setuptools and MySQLdb, as described below, and not re-installing MySQL or Python. I installed MacPorts, but decided not to use it after doing a dry-run and seeing that it was planning to re-install a bunch of stuff that it doesn't know I already have installed and configured: MySQL, Python, etc. Seems like MacPorts is too intrusive if you don't use it from day one for all Mac installs. Homebrew would have the same problem, I guess, as do yum and apt-get on Linux. It's hard to start using any of them after a couple years of configuring the system manually because none of the packages you already installed are recorded in their records. I may start using Homebrew the next time I configure a Mac from scratch, just as I now do all of my Linux boxes via yum. For now, I did a manual install of Python setuptools, and then a manual install of the MySQLdb driver for Python. Everything's working fine. Turned out to be as easy as: - Download setuptools-0.6c11-py2.7.egg from http://pypi.python.org/pypi/setuptools/ % sh setuptools-0.6c11-py2.7.egg - Download MySQL-python-1.2.3.tar.gz from http://sourceforge.net/projects/mysql-python/ % gunzip MySQL-python-1.2.3.tar.gz % tar -xvf MySQL-python-1.2.3.tar % cd MySQL-python-1.2.3 % python setup.py build % sudo python setup.py install Thanks! --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. On 9/23/12 9:54 PM, Andrew Macgregor wrote: Hi Fred, I've also found HomeBrew to be useful. Here's a good setup guide: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ Cheers, Andrew. On Monday, September 24, 2012 2:02:37 AM UTC+8, Fred Stluka wrote: Resolved this on my own. Here's what I did: - Downloaded and installed MacPorts, but decided not to use it because I have too much software already installed that MacPorts doesn't know about and wants to reinstall (MySQL, Python, OpenSSL, etc.) - Downloaded and installed Python setuptools and resumed the MySQLdb setup that I'd already begun (see my previous post appended below). It turned out to be easy: - Download setuptools-0.6c11-py2.7.egg from http://pypi.python.org/pypi/setuptools/ <http://pypi.python.org/pypi/setuptools/> % sh setuptools-0.6c11-py2.7.egg % cd MySQL-python-1.2.3 % python setup.py build % sudo python setup.py install Success! Now I can access MySQL from my Python/Django apps. BTW, I also downloaded and installed PyCharm. Nice Python IDE! --Fred Fred Stluka -- mailt...@bristle.com -- http://bristle.com/~fred/ <http://bristle.com/%7Efred/> Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. On 9/22/12 5:28 PM, Fred Stluka wrote: Django users, What's the latest on the easiest way to access MySQL from Django on Mac OS X 10.6.8 (Snow Leopard)? I've Googled lots of info, but some may be outdated. Seems to be more complicated than it should be, especially since everything else to do with Django has been so easy. Here's what I've done and learned: - Followed MYSQLdb link in Django docs: https://docs.djangoproject.com/en/1.4/topics/install/#database-installation <https://docs.djangoproject.com/en/1.4/topics/install/#database-installation> to: http://sourceforge.net/projects/mysql-python/ <http://sourceforge.net/projects/mysql-python/> and downloaded: MySQL-python-1.2.3.tar.gz - More info at: http://mysql-python.sourceforge.net/ <http://mysql-python.sourceforge.net/> - Confirmed it is not already installed: % python Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb Traceback (most recent call last): File "", line 1, in File "MySQLdb/__init__.py", line 19, in import _mysql
Re: Easiest way to access MySQL from Django on Mac OS X?...
When I'm setting up a new Mac OS system, the process I go through to install Python and MySQL. First, I install Python using this guide: http://docs.python-guide.org/en/latest/starting/install/osx/ The guide also installs Homebrew, which works great for me so far and is easily removable. After Python and Homebrew is installed, then you can install mysql with: brew install mysql This will get us the proper headers we need to install MySQLdb with pip. After MySQL is installed, you can install MySQLdb into a virtualenv or system-wide with a simple command: pip install MySQLdb Hope that helps, - Chris On Sun, Sep 23, 2012 at 6:54 PM, Andrew Macgregor wrote: > Hi Fred, > > I've also found HomeBrew to be useful. Here's a good setup guide: > > > http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ > > Cheers, Andrew. > > > On Monday, September 24, 2012 2:02:37 AM UTC+8, Fred Stluka wrote: > >> Resolved this on my own. Here's what I did: >> >> - Downloaded and installed MacPorts, but decided not to use it >>because I have too much software already installed that >>MacPorts doesn't know about and wants to reinstall (MySQL, >>Python, OpenSSL, etc.) >> >> - Downloaded and installed Python setuptools and resumed the >>MySQLdb setup that I'd already begun (see my previous post >>appended below). It turned out to be easy: >>- Download setuptools-0.6c11-py2.7.egg from >> >> http://pypi.python.org/pypi/**setuptools/<http://pypi.python.org/pypi/setuptools/> >>% sh setuptools-0.6c11-py2.7.egg >>% cd MySQL-python-1.2.3 >>% python setup.py build >>% sudo python setup.py install >> >> Success! Now I can access MySQL from my Python/Django apps. >> >> BTW, I also downloaded and installed PyCharm. Nice Python IDE! >> >> --Fred >> -- >> Fred Stluka -- mailt...@bristle.com -- http://bristle.com/~fred/ >> Bristle Software, Inc -- http://bristle.com -- Glad to be of service! >> Open Source: Without walls and fences, we need no Windows or Gates. >> -- >> >> On 9/22/12 5:28 PM, Fred Stluka wrote: >> >> Django users, >> >> What's the latest on the easiest way to access MySQL from Django >> on Mac OS X 10.6.8 (Snow Leopard)? >> >> I've Googled lots of info, but some may be outdated. Seems to be >> more complicated than it should be, especially since everything else >> to do with Django has been so easy. >> >> Here's what I've done and learned: >> >> - Followed MYSQLdb link in Django docs: >> https://docs.djangoproject.**com/en/1.4/topics/install/#** >> database-installation<https://docs.djangoproject.com/en/1.4/topics/install/#database-installation> >> to: >> >> http://sourceforge.net/**projects/mysql-python/<http://sourceforge.net/projects/mysql-python/> >> and downloaded: >> MySQL-python-1.2.3.tar.gz >> - More info at: >> http://mysql-python.**sourceforge.net/<http://mysql-python.sourceforge.net/> >> - Confirmed it is not already installed: >> % python >> Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) >> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin >> Type "help", "copyright", "credits" or "license" for more >> information. >> >>> import MySQLdb >> Traceback (most recent call last): >> File "", line 1, in >> File "MySQLdb/__init__.py", line 19, in >> import _mysql >> ImportError: No module named _mysql >> >>> >> % gunzip MySQL-python-1.2.3.tar.gz >> % tar -xvf MySQL-python-1.2.3.tar >> % less README >> - Lots of caveats. Has to be built and installed. Looks ugly. >> - Says it requires setuptools Python module. >> - Confirmed setuptools is not already installed, by trying the >> import >> statement that setup.py is going to do: >> % python >> >>> from setuptools import setup, Extension >> Traceback (most recent call last): >> File "", line 1, in >> ImportError: No module named setuptools >> >>> >> % python setup.py build >> - Got error, as expected: >> Traceback (most recent call last): >> File "setup.py", line 5, in >
Re: Easiest way to access MySQL from Django on Mac OS X?...
Hi Fred, I've also found HomeBrew to be useful. Here's a good setup guide: http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/ Cheers, Andrew. On Monday, September 24, 2012 2:02:37 AM UTC+8, Fred Stluka wrote: > > Resolved this on my own. Here's what I did: > > - Downloaded and installed MacPorts, but decided not to use it >because I have too much software already installed that >MacPorts doesn't know about and wants to reinstall (MySQL, >Python, OpenSSL, etc.) > > - Downloaded and installed Python setuptools and resumed the >MySQLdb setup that I'd already begun (see my previous post >appended below). It turned out to be easy: >- Download setuptools-0.6c11-py2.7.egg from > http://pypi.python.org/pypi/setuptools/ >% sh setuptools-0.6c11-py2.7.egg >% cd MySQL-python-1.2.3 >% python setup.py build >% sudo python setup.py install > > Success! Now I can access MySQL from my Python/Django apps. > > BTW, I also downloaded and installed PyCharm. Nice Python IDE! > > --Fred > -- > Fred Stluka -- mailt...@bristle.com -- > http://bristle.com/~fred/ > Bristle Software, Inc -- http://bristle.com -- Glad to be of service! > Open Source: Without walls and fences, we need no Windows or Gates. > -- > > On 9/22/12 5:28 PM, Fred Stluka wrote: > > Django users, > > What's the latest on the easiest way to access MySQL from Django > on Mac OS X 10.6.8 (Snow Leopard)? > > I've Googled lots of info, but some may be outdated. Seems to be > more complicated than it should be, especially since everything else > to do with Django has been so easy. > > Here's what I've done and learned: > > - Followed MYSQLdb link in Django docs: > > https://docs.djangoproject.com/en/1.4/topics/install/#database-installation > to: > http://sourceforge.net/projects/mysql-python/ > and downloaded: > MySQL-python-1.2.3.tar.gz > - More info at: http://mysql-python.sourceforge.net/ > - Confirmed it is not already installed: > % python > Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more > information. > >>> import MySQLdb > Traceback (most recent call last): > File "", line 1, in > File "MySQLdb/__init__.py", line 19, in > import _mysql > ImportError: No module named _mysql > >>> > % gunzip MySQL-python-1.2.3.tar.gz > % tar -xvf MySQL-python-1.2.3.tar > % less README > - Lots of caveats. Has to be built and installed. Looks ugly. > - Says it requires setuptools Python module. > - Confirmed setuptools is not already installed, by trying the import > statement that setup.py is going to do: > % python > >>> from setuptools import setup, Extension > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named setuptools > >>> > % python setup.py build > - Got error, as expected: > Traceback (most recent call last): > File "setup.py", line 5, in > from setuptools import setup, Extension > ImportError: No module named setuptools > Exit 1 > % sudo python setup.py install > - No. Didn't try. Not yet built. > > > So now I need setuptools first. Am I starting down a long dependency > chain of installs, or will this be easy? > > I have a Linux server, where it appears that I could use yum to do > a painless install: > > % yum list all | grep -i mysql | grep -i py > MySQL-python.x86_64 1.2.3-0.3.c1.1.8.amzn1 amzn-main > > Perhaps there's an easier way for Mac OS X also? Did some more > Googling and found: > > > http://stackoverflow.com/questions/1448429/how-to-install-mysqldb-python-data-access-library-to-mysql-on-mac-os-x > > which is a longish manual set of instructions by an author who wishes > there were a better way, but another reply says to just use MacPorts to > install it. > > Any advice? Thanks! > > --Fred > -- > Fred Stluka -- mailt...@bristle.com -- > http://bristle.com/~fred/ > Bristle Software, Inc -- http://bristle.com -- Glad to be of service! > Open Source: Without walls and fences, we need no Windows or Gates. > -
Re: Easiest way to access MySQL from Django on Mac OS X?...
Resolved this on my own. Here's what I did: - Downloaded and installed MacPorts, but decided not to use it because I have too much software already installed that MacPorts doesn't know about and wants to reinstall (MySQL, Python, OpenSSL, etc.) - Downloaded and installed Python setuptools and resumed the MySQLdb setup that I'd already begun (see my previous post appended below). It turned out to be easy: - Download setuptools-0.6c11-py2.7.egg from http://pypi.python.org/pypi/setuptools/ % sh setuptools-0.6c11-py2.7.egg % cd MySQL-python-1.2.3 % python setup.py build % sudo python setup.py install Success! Now I can access MySQL from my Python/Django apps. BTW, I also downloaded and installed PyCharm. Nice Python IDE! --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. On 9/22/12 5:28 PM, Fred Stluka wrote: Django users, What's the latest on the easiest way to access MySQL from Django on Mac OS X 10.6.8 (Snow Leopard)? I've Googled lots of info, but some may be outdated. Seems to be more complicated than it should be, especially since everything else to do with Django has been so easy. Here's what I've done and learned: - Followed MYSQLdb link in Django docs: https://docs.djangoproject.com/en/1.4/topics/install/#database-installation to: http://sourceforge.net/projects/mysql-python/ and downloaded: MySQL-python-1.2.3.tar.gz - More info at: http://mysql-python.sourceforge.net/ - Confirmed it is not already installed: % python Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb Traceback (most recent call last): File "", line 1, in File "MySQLdb/__init__.py", line 19, in import _mysql ImportError: No module named _mysql >>> % gunzip MySQL-python-1.2.3.tar.gz % tar -xvf MySQL-python-1.2.3.tar % less README - Lots of caveats. Has to be built and installed. Looks ugly. - Says it requires setuptools Python module. - Confirmed setuptools is not already installed, by trying the import statement that setup.py is going to do: % python >>> from setuptools import setup, Extension Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools >>> % python setup.py build - Got error, as expected: Traceback (most recent call last): File "setup.py", line 5, in from setuptools import setup, Extension ImportError: No module named setuptools Exit 1 % sudo python setup.py install - No. Didn't try. Not yet built. So now I need setuptools first. Am I starting down a long dependency chain of installs, or will this be easy? I have a Linux server, where it appears that I could use yum to do a painless install: % yum list all | grep -i mysql | grep -i py MySQL-python.x86_64 1.2.3-0.3.c1.1.8.amzn1 amzn-main Perhaps there's an easier way for Mac OS X also? Did some more Googling and found: http://stackoverflow.com/questions/1448429/how-to-install-mysqldb-python-data-access-library-to-mysql-on-mac-os-x which is a longish manual set of instructions by an author who wishes there were a better way, but another reply says to just use MacPorts to install it. Any advice? Thanks! --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Easiest way to access MySQL from Django on Mac OS X?...
Django users, What's the latest on the easiest way to access MySQL from Django on Mac OS X 10.6.8 (Snow Leopard)? I've Googled lots of info, but some may be outdated. Seems to be more complicated than it should be, especially since everything else to do with Django has been so easy. Here's what I've done and learned: - Followed MYSQLdb link in Django docs: https://docs.djangoproject.com/en/1.4/topics/install/#database-installation to: http://sourceforge.net/projects/mysql-python/ and downloaded: MySQL-python-1.2.3.tar.gz - More info at: http://mysql-python.sourceforge.net/ - Confirmed it is not already installed: % python Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb Traceback (most recent call last): File "", line 1, in File "MySQLdb/__init__.py", line 19, in import _mysql ImportError: No module named _mysql >>> % gunzip MySQL-python-1.2.3.tar.gz % tar -xvf MySQL-python-1.2.3.tar % less README - Lots of caveats. Has to be built and installed. Looks ugly. - Says it requires setuptools Python module. - Confirmed setuptools is not already installed, by trying the import statement that setup.py is going to do: % python >>> from setuptools import setup, Extension Traceback (most recent call last): File "", line 1, in ImportError: No module named setuptools >>> % python setup.py build - Got error, as expected: Traceback (most recent call last): File "setup.py", line 5, in from setuptools import setup, Extension ImportError: No module named setuptools Exit 1 % sudo python setup.py install - No. Didn't try. Not yet built. So now I need setuptools first. Am I starting down a long dependency chain of installs, or will this be easy? I have a Linux server, where it appears that I could use yum to do a painless install: % yum list all | grep -i mysql | grep -i py MySQL-python.x86_64 1.2.3-0.3.c1.1.8.amzn1 amzn-main Perhaps there's an easier way for Mac OS X also? Did some more Googling and found: http://stackoverflow.com/questions/1448429/how-to-install-mysqldb-python-data-access-library-to-mysql-on-mac-os-x which is a longish manual set of instructions by an author who wishes there were a better way, but another reply says to just use MacPorts to install it. Any advice? Thanks! --Fred Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/ Bristle Software, Inc -- http://bristle.com -- Glad to be of service! Open Source: Without walls and fences, we need no Windows or Gates. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
Tried homebrew - this was a response to another reply Thomas. brew update Here I tried: brew install postgresql but had this error Error: Failed executing: make install-world (postgresql.rb:67) So instead I did this: brew install postgres --no-ossp-uuid --no-python --no-rubie Then when running python manage.py runserver I got this error mentioned first: Symbol not found: _PQbackendPID In my virtual env I did not install python, it used my mac installation, that is correct. However from the nature of the error it did not look like it relates to python. In my settings.py I followed Heroku instructions and put this for the database: import dj_database_url DATABASES = {'default': dj_database_url.config(default='postgres://localhost')} Here are some details on my virtual env: That's the structure, without all the files of course: venv/lib/python2.7/warnings.pyc venv/include/python2.7/unicodeobject.h venv/include/python2.7/metagrammar.h venv/lib/python2.7/site-packages: setuptools.pth pip-1.1-py2.7.egg dj_database_url.pyc distribute-0.6.24-py2.7.egg psycopg2-2.4.5-py2.7.egg-info easy-install.pth dj_database_url.py Django-1.4-py2.7.egg-info psycopg2 django dj_database_url-0.2.0-py2.7.egg-info venv/lib/python2.7/lib-dynload: zlib.so fcntl.so _scproxy.so _codecs_jp.so _Help.so unicodedata.so dl.so _random.so _codecs_iso2022.so . venv/lib/python2.7/encodings: zlib_codec.pyo shift_jis_2004.pyc mac_croatian.py iso8859_13.pyo gb18030.pyc cp860.py cp1253.pyo . venv/lib/python2.7/distutils: distutils.cfg __init__.pyc __init__.py venv/lib/python2.7/config: python.o libpython2.7.dylib install-sh config.c Setup.config Makefile makesetup libpython2.7.a config.c.in Setup.local Setup Not sure if these are the details that can help. Moshe On Sunday, July 18, 2010 5:06:58 PM UTC-7, daniel.franca wrote: > > Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that > would be easy to migrate my Django project to that. > I was wrong, a lot wrong... > First I tried to install Python2.7, the libs I need to my project, etc > After that I get the error: > *gresql_psycopg2/base.py", line 24, in * > *raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)* > *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 > module: > dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, > > 2): Symbol not found: _PQbackendPID* > * Referenced from: > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so > * > * Expected in: flat namespace* > * in > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so > * > * > * > After some research I saw some suggestions, one of them was to download > and install everything from Ports. But it didn't work for me too: > > :info:configure configure: error: library 'xml2' (version >= 2.6.23) is > required for XML support > :info:configure shell command " cd > "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_postgresql84/work/postgresql-8.4.4" > > && ./configure --prefix=/opt/local --disable-dependency-tracking > --sysconfdir=/opt/local/etc/postgresql84 > --bindir=/opt/local/lib/postgresql84/bin > --libdir=/opt/local/lib/postgresql84 > --includedir=/opt/local/include/postgresql84 > --datadir=/opt/local/share/postgresql84 --mandir=/opt/local/share/man > --without-docdir --with-includes=/opt/local/include > --with-libraries=/opt/local/lib --with-openssl --with-bonjour > --with-readline --with-zlib --with-libxml --with-libxslt > --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " > returned error 1 > :error:configure Target org.macports.configure returned: configure > failure: shell command failed > > But libxml2.7 was there, what I did? I tried to remove it and install > again, but when I tried to reinstall it I get another error: > > Error: You cannot install libxml2 for the architecture(s) x86_64 i386 > because > > Error: its dependency libiconv only contains the architecture(s) i386 ppc. > > I tried install psycopg2 using easy_install... everything looks fine, but > when I try to run my project, same error before. > > Another suggestion I found was to run python in 32 bits mode. > > I did a little test: > > "arch -i386 pyhon -c 'import psycopg2' > > It seems to work, but when I ran my project the error is still there, > tried to change de env variable: > > defaults write com.apple.versioner.python Prefer-32-Bit -bool yes > > no success yet. > > So I gave up of Python2.7 and back to Python2.5 tried to install > everything again. > > and it's not even recognize Django: > > Traceback (most recent call last): > File "./manage.py", line 11, in > from django.conf import settings > ImportError: No module named django.conf > > The libs are here: > python -c "from distutils.
Re: Django on Mac OS X
On 6/16/12 9:41 PM, Moshe Voloshin wrote: I tried that too, but it didn't change anythin Tried what too? I've had good luck with python, virtualenv, and postgresql from MacPorts and then using virtualenv and pip to get psycopg2, django, etc. The library path from your error indicates that you are using the Apple python installation which is not what you would find with MacPorts. You do have /opt/local/bin in your path? Try for a self-consistent installation and you should stop getting unresolved symbols. You will likely need to give more details on what you are actually running and where it is installed for someone to give more help. hth - Tom On Saturday, June 16, 2012 9:21:38 PM UTC-7, Kurtis wrote: Try using the Brew (or ports or whatever it's called on Mac) system to install Python, PostgreSQL, and the postgresql development libs. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
I tried that too, but it didn't change anythin On Saturday, June 16, 2012 9:21:38 PM UTC-7, Kurtis wrote: > > Try using the Brew (or ports or whatever it's called on Mac) system to > install Python, PostgreSQL, and the postgresql development libs. > > On Sat, Jun 16, 2012 at 11:22 PM, Moshe Voloshin wrote: > >> Replying to this old post as I am having this problem of: >> Symbol not found: _PQbackendPID >> On MAC OS x 10.6.8 >> using: >> python 2.7 and postgres 9.1.4 >> On virtual env >> Wanted to ask if you guys seen this issue with python 2.7 and do you know >> if there is a solution to this. >> >> Thanks >> >> On Sunday, July 18, 2010 5:06:58 PM UTC-7, daniel.franca wrote: >>> >>> Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that >>> would be easy to migrate my Django project to that. >>> I was wrong, a lot wrong... >>> First I tried to install Python2.7, the libs I need to my project, etc >>> After that I get the error: >>> *gresql_psycopg2/base.py", line 24, in * >>> *raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) >>> * >>> *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 >>> module: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/ >>> lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: >>> _PQbackendPID* >>> * Referenced from: /Library/Frameworks/Python. >>> framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so* >>> * Expected in: flat namespace* >>> * in /Library/Frameworks/Python.framework/Versions/2.7/lib/ >>> python2.7/site-packages/psycopg2/_psycopg.so* >>> * >>> * >>> After some research I saw some suggestions, one of them was to download >>> and install everything from Ports. But it didn't work for me too: >>> >>> :info:configure configure: error: library 'xml2' (version >= 2.6.23) is >>> required for XML support >>> :info:configure shell command " cd "/opt/local/var/macports/** >>> build/_opt_local_var_macports_**sources_rsync.macports.org_** >>> release_ports_databases_**postgresql84/work/postgresql-**8.4.4" && >>> ./configure --prefix=/opt/local --disable-dependency-tracking >>> --sysconfdir=/opt/local/etc/**postgresql84 >>> --bindir=/opt/local/lib/**postgresql84/bin >>> --libdir=/opt/local/lib/**postgresql84 >>> --includedir=/opt/local/**include/postgresql84 >>> --datadir=/opt/local/share/**postgresql84 --mandir=/opt/local/share/man >>> --without-docdir --with-includes=/opt/local/**include >>> --with-libraries=/opt/local/**lib --with-openssl --with-bonjour >>> --with-readline --with-zlib --with-libxml --with-libxslt >>> --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " >>> returned error 1 >>> :error:configure Target org.macports.configure returned: configure >>> failure: shell command failed >>> >>> But libxml2.7 was there, what I did? I tried to remove it and install >>> again, but when I tried to reinstall it I get another error: >>> >>> Error: You cannot install libxml2 for the architecture(s) x86_64 i386 >>> because >>> >>> Error: its dependency libiconv only contains the architecture(s) i386 >>> ppc. >>> >>> I tried install psycopg2 using easy_install... everything looks fine, >>> but when I try to run my project, same error before. >>> >>> Another suggestion I found was to run python in 32 bits mode. >>> >>> I did a little test: >>> >>> "arch -i386 pyhon -c 'import psycopg2' >>> >>> It seems to work, but when I ran my project the error is still there, >>> tried to change de env variable: >>> >>> defaults write com.apple.versioner.python Prefer-32-Bit -bool yes >>> >>> no success yet. >>> >>> So I gave up of Python2.7 and back to Python2.5 tried to install >>> everything again. >>> >>> and it's not even recognize Django: >>> >>> Traceback (most recent call last): >>> File "./manage.py", line 11, in >>> from django.conf import settings >>> ImportError: No module named django.conf >>> >>> The libs are here: >>> python -c "from distutils.sysconfig import get_python_lib; print >>> get_python_lib()" >>> /System/Library/Frameworks/**Python.framework/Versions/2.5/** >>> lib/python2.5/site-packages >>> >>> ls /System/Library/Frameworks/**Python.framework/Versions/2.5/** >>> lib/python2.5/site-packages >>> Django-1.2.1-py2.5.egg-info django_extensions-0.5-py2.5.**egg-info >>> psycopg2 >>> PIL django_pagination-1.0.7-py2.5.**egg psycopg2-2.2.2-py2.5.egg-info >>> PIL.pth django_robots-0.8.0-py2.5.egg pytz-2010h-py2.5.egg >>> South-0.7.1-py2.5.egg django_tagging-0.3.1-py2.5.**egg-info >>> setuptools-0.6c11-py2.5.egg >>> django django_timezones-0.1.4-py2.5.**egg setuptools.pth >>> django_db_log-2.0.0-py2.5.egg easy-install.pth tagging >>> django_dbtemplates-0.7.1-py2.**5.egg include_server >>> django_extensions include_server-3.1_toolwhip.1-**py2.5.egg-info >>> >>> python --version >>> Python 2.5.4 >>> >>> Best Regards, >>> >>> Daniel França >>> >>> >>> >>> >>> -- >> You received this message because you are subscribed to t
Re: Django on Mac OS X
Try using the Brew (or ports or whatever it's called on Mac) system to install Python, PostgreSQL, and the postgresql development libs. On Sat, Jun 16, 2012 at 11:22 PM, Moshe Voloshin wrote: > Replying to this old post as I am having this problem of: > Symbol not found: _PQbackendPID > On MAC OS x 10.6.8 > using: > python 2.7 and postgres 9.1.4 > On virtual env > Wanted to ask if you guys seen this issue with python 2.7 and do you know > if there is a solution to this. > > Thanks > > On Sunday, July 18, 2010 5:06:58 PM UTC-7, daniel.franca wrote: >> >> Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that >> would be easy to migrate my Django project to that. >> I was wrong, a lot wrong... >> First I tried to install Python2.7, the libs I need to my project, etc >> After that I get the error: >> *gresql_psycopg2/base.py", line 24, in * >> *raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)* >> *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 >> module: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/ >> lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: >> _PQbackendPID* >> * Referenced from: /Library/Frameworks/Python. >> framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so* >> * Expected in: flat namespace* >> * in /Library/Frameworks/Python.framework/Versions/2.7/lib/ >> python2.7/site-packages/psycopg2/_psycopg.so* >> * >> * >> After some research I saw some suggestions, one of them was to download >> and install everything from Ports. But it didn't work for me too: >> >> :info:configure configure: error: library 'xml2' (version >= 2.6.23) is >> required for XML support >> :info:configure shell command " cd "/opt/local/var/macports/** >> build/_opt_local_var_macports_**sources_rsync.macports.org_** >> release_ports_databases_**postgresql84/work/postgresql-**8.4.4" && >> ./configure --prefix=/opt/local --disable-dependency-tracking >> --sysconfdir=/opt/local/etc/**postgresql84 >> --bindir=/opt/local/lib/**postgresql84/bin >> --libdir=/opt/local/lib/**postgresql84 >> --includedir=/opt/local/**include/postgresql84 >> --datadir=/opt/local/share/**postgresql84 --mandir=/opt/local/share/man >> --without-docdir --with-includes=/opt/local/**include >> --with-libraries=/opt/local/**lib --with-openssl --with-bonjour >> --with-readline --with-zlib --with-libxml --with-libxslt >> --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " >> returned error 1 >> :error:configure Target org.macports.configure returned: configure >> failure: shell command failed >> >> But libxml2.7 was there, what I did? I tried to remove it and install >> again, but when I tried to reinstall it I get another error: >> >> Error: You cannot install libxml2 for the architecture(s) x86_64 i386 >> because >> >> Error: its dependency libiconv only contains the architecture(s) i386 ppc. >> >> I tried install psycopg2 using easy_install... everything looks fine, but >> when I try to run my project, same error before. >> >> Another suggestion I found was to run python in 32 bits mode. >> >> I did a little test: >> >> "arch -i386 pyhon -c 'import psycopg2' >> >> It seems to work, but when I ran my project the error is still there, >> tried to change de env variable: >> >> defaults write com.apple.versioner.python Prefer-32-Bit -bool yes >> >> no success yet. >> >> So I gave up of Python2.7 and back to Python2.5 tried to install >> everything again. >> >> and it's not even recognize Django: >> >> Traceback (most recent call last): >> File "./manage.py", line 11, in >> from django.conf import settings >> ImportError: No module named django.conf >> >> The libs are here: >> python -c "from distutils.sysconfig import get_python_lib; print >> get_python_lib()" >> /System/Library/Frameworks/**Python.framework/Versions/2.5/** >> lib/python2.5/site-packages >> >> ls /System/Library/Frameworks/**Python.framework/Versions/2.5/** >> lib/python2.5/site-packages >> Django-1.2.1-py2.5.egg-info django_extensions-0.5-py2.5.**egg-info >> psycopg2 >> PIL django_pagination-1.0.7-py2.5.**egg psycopg2-2.2.2-py2.5.egg-info >> PIL.pth django_robots-0.8.0-py2.5.egg pytz-2010h-py2.5.egg >> South-0.7.1-py2.5.egg django_tagging-0.3.1-py2.5.**egg-info >> setuptools-0.6c11-py2.5.egg >> django django_timezones-0.1.4-py2.5.**egg setuptools.pth >> django_db_log-2.0.0-py2.5.egg easy-install.pth tagging >> django_dbtemplates-0.7.1-py2.**5.egg include_server >> django_extensions include_server-3.1_toolwhip.1-**py2.5.egg-info >> >> python --version >> Python 2.5.4 >> >> Best Regards, >> >> Daniel França >> >> >> >> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/opErLpsqs4wJ. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django
Re: Django on Mac OS X
Replying to this old post as I am having this problem of: Symbol not found: _PQbackendPID On MAC OS x 10.6.8 using: python 2.7 and postgres 9.1.4 On virtual env Wanted to ask if you guys seen this issue with python 2.7 and do you know if there is a solution to this. Thanks On Sunday, July 18, 2010 5:06:58 PM UTC-7, daniel.franca wrote: > > Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that > would be easy to migrate my Django project to that. > I was wrong, a lot wrong... > First I tried to install Python2.7, the libs I need to my project, etc > After that I get the error: > *gresql_psycopg2/base.py", line 24, in * > *raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)* > *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 > module: > dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, > > 2): Symbol not found: _PQbackendPID* > * Referenced from: > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so > * > * Expected in: flat namespace* > * in > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so > * > * > * > After some research I saw some suggestions, one of them was to download > and install everything from Ports. But it didn't work for me too: > > :info:configure configure: error: library 'xml2' (version >= 2.6.23) is > required for XML support > :info:configure shell command " cd > "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_postgresql84/work/postgresql-8.4.4" > > && ./configure --prefix=/opt/local --disable-dependency-tracking > --sysconfdir=/opt/local/etc/postgresql84 > --bindir=/opt/local/lib/postgresql84/bin > --libdir=/opt/local/lib/postgresql84 > --includedir=/opt/local/include/postgresql84 > --datadir=/opt/local/share/postgresql84 --mandir=/opt/local/share/man > --without-docdir --with-includes=/opt/local/include > --with-libraries=/opt/local/lib --with-openssl --with-bonjour > --with-readline --with-zlib --with-libxml --with-libxslt > --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " > returned error 1 > :error:configure Target org.macports.configure returned: configure > failure: shell command failed > > But libxml2.7 was there, what I did? I tried to remove it and install > again, but when I tried to reinstall it I get another error: > > Error: You cannot install libxml2 for the architecture(s) x86_64 i386 > because > > Error: its dependency libiconv only contains the architecture(s) i386 ppc. > > I tried install psycopg2 using easy_install... everything looks fine, but > when I try to run my project, same error before. > > Another suggestion I found was to run python in 32 bits mode. > > I did a little test: > > "arch -i386 pyhon -c 'import psycopg2' > > It seems to work, but when I ran my project the error is still there, > tried to change de env variable: > > defaults write com.apple.versioner.python Prefer-32-Bit -bool yes > > no success yet. > > So I gave up of Python2.7 and back to Python2.5 tried to install > everything again. > > and it's not even recognize Django: > > Traceback (most recent call last): > File "./manage.py", line 11, in > from django.conf import settings > ImportError: No module named django.conf > > The libs are here: > python -c "from distutils.sysconfig import get_python_lib; print > get_python_lib()" > > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > > ls > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages > Django-1.2.1-py2.5.egg-info django_extensions-0.5-py2.5.egg-info psycopg2 > PIL django_pagination-1.0.7-py2.5.egg psycopg2-2.2.2-py2.5.egg-info > PIL.pth django_robots-0.8.0-py2.5.egg pytz-2010h-py2.5.egg > South-0.7.1-py2.5.egg django_tagging-0.3.1-py2.5.egg-info > setuptools-0.6c11-py2.5.egg > django django_timezones-0.1.4-py2.5.egg setuptools.pth > django_db_log-2.0.0-py2.5.egg easy-install.pth tagging > django_dbtemplates-0.7.1-py2.5.egg include_server > django_extensions include_server-3.1_toolwhip.1-py2.5.egg-info > > python --version > Python 2.5.4 > > Best Regards, > > Daniel França > > > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/opErLpsqs4wJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
thanks Andrew, Now I've installed Pinax into a Virtualenv and it's working fine...I installed only the libs versions that Pinax script install. On Sat, Aug 21, 2010 at 10:55 PM, AndrewK wrote: > I've had the same problem on my Mac just now. > It seems like this is an issue with django-timezones > > Try to install dev version from here: > pip install -e git:// > github.com/brosner/django-timezones.git#egg=django-timezones > > Andrew > > On Aug 9, 1:40 pm, Daniel França wrote: > > Thanx for all the help, > > I tried to run on Sqlite3, and I don't if it's bad or good news, but > there's > > error even in Sqlite3 > > > > just when I tried to create the db (syncdb) I get just after I input my > > users data or when I try to create a user in shell: > > Traceback (most recent call last): > > File "manage.py", line 31, in > > execute_from_command_line() > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/__init__.py", > > line 429, in execute_from_command_line > > utility.execute() > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/__init__.py", > > line 379, in execute > > self.fetch_command(subcommand).run_from_argv(self.argv) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > > line 191, in run_from_argv > > self.execute(*args, **options.__dict__) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > > line 218, in execute > > output = self.handle(*args, **options) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > > line 347, in handle > > return self.handle_noargs(**options) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/commands/syncdb.py", > > line 103, in handle_noargs > > emit_post_sync_signal(created_models, verbosity, interactive, db) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/sql.py", > > line 185, in emit_post_sync_signal > > interactive=interactive, db=db) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/dispatch/dispatcher.py", > > line 162, in send > > response = receiver(signal=self, sender=sender, **named) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/management/__init__.py", > > line 44, in create_superuser > > call_command("createsuperuser", interactive=True) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/__init__.py", > > line 166, in call_command > > return klass.execute(*args, **defaults) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > > line 218, in execute > > output = self.handle(*args, **options) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/management/commands/createsuperuser.py", > > line 134, in handle > > User.objects.create_superuser(username, email, password) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/models.py", > > line 133, in create_superuser > > u = self.create_user(username, email, password) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/models.py", > > line 129, in create_user > > user.save(using=self._db) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/base.py", > > line 435, in save > > self.save_base(using=using, force_insert=force_insert, > > force_update=force_update) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/base.py", > > line 543, in save_base > > created=(not record_exists), raw=raw) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/dispatch/dispatcher.py", > > line 162, in send > > response = receiver(signal=self, sender=sender, **named) > > File > > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > > line 61, in create_account > > account, created = > > Account.objects.get_or_create(user=instance,timezone='America/Sao_Paulo') > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/manager.py", > > line 135, in get_or_create > > return self.get_query_set().get_or_creat
Re: Django on Mac OS X
I've had the same problem on my Mac just now. It seems like this is an issue with django-timezones Try to install dev version from here: pip install -e git://github.com/brosner/django-timezones.git#egg=django-timezones Andrew On Aug 9, 1:40 pm, Daniel França wrote: > Thanx for all the help, > I tried to run on Sqlite3, and I don't if it's bad or good news, but there's > error even in Sqlite3 > > just when I tried to create the db (syncdb) I get just after I input my > users data or when I try to create a user in shell: > Traceback (most recent call last): > File "manage.py", line 31, in > execute_from_command_line() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/__init__.py", > line 429, in execute_from_command_line > utility.execute() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/__init__.py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > line 347, in handle > return self.handle_noargs(**options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/commands/syncdb.py", > line 103, in handle_noargs > emit_post_sync_signal(created_models, verbosity, interactive, db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/sql.py", > line 185, in emit_post_sync_signal > interactive=interactive, db=db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/management/__init__.py", > line 44, in create_superuser > call_command("createsuperuser", interactive=True) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/__init__.py", > line 166, in call_command > return klass.execute(*args, **defaults) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/management/commands/createsuperuser.py", > line 134, in handle > User.objects.create_superuser(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/models.py", > line 133, in create_superuser > u = self.create_user(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/contrib/auth/models.py", > line 129, in create_user > user.save(using=self._db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/base.py", > line 435, in save > self.save_base(using=using, force_insert=force_insert, > force_update=force_update) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/base.py", > line 543, in save_base > created=(not record_exists), raw=raw) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > line 61, in create_account > account, created = > Account.objects.get_or_create(user=instance,timezone='America/Sao_Paulo') > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/manager.py", > line 135, in get_or_create > return self.get_query_set().get_or_create(**kwargs) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/query.py", > line 366, in get_or_create > return self.get(**kwargs), False > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packa > ges/django/db/models/query.py", > line 336, in get > num = len(clone) > File > "/Library/Frameworks/Python.fr
Re: Django on Mac OS X
thanx, I'll look at that =) On Tue, Aug 10, 2010 at 12:31 PM, Xavier Ordoquy wrote: > It is a bit trickier. > Pinax application gets all their dependancies through pip installation and > requirement files. > If you have a pinax application, take a look in the requirements directory. > You'll find two files (base.txt and project.txt) that tell exactly what > application to get and what versions are needed. > Pinax does all the bootstrap processing, so once you installed a pinax > application, you already have a working environment. > > Your application is based on the same common set with Pinax application. > However, if you copied the code, you didn't went thought pinax bootstraping > operations which would have installed all the required applications with the > correct versions. > It happens that I am unable to make your application work on osx and Linux > with the latest stable django-timezones (0.1.x). > However, using the version that Pinax requires (0.2.dev1) it works on both > linux and osx. > However, you may find other differences if your environments are different. > Please google for virtualenv and pip to get the same environment on your > various development boxes as well as your production ones and enjoy > virtualenv, pip, Python, Django, OSX and Linux :) > > Regards, > Xavier. > > Le 10 août 2010 à 17:12, Daniel França a écrit : > > *I bet you installed pinax on your linux box but not on your osx one (or > not in the same virtual env).* > *hmmm, I just copied the code from Linux to OSX, is it what you mean? I > should have "install" Pinax, that's it?* > > On Tue, Aug 10, 2010 at 12:05 PM, Xavier Ordoquy wrote: > >> >> Actually, it doesn't work on Linux either with the same settings. >> Please update django-timezones to 0.2.dev2 which is what pinax uses (pip >> install >> --extra-index-url=http://dist.pinaxproject.com/dev/django-timezones==0.2.dev1). >> The latest stable doesn't seem to work with >> django 1.2. >> I bet you installed pinax on your linux box but not on your osx one (or >> not in the same virtual env). >> >> Regards, >> Xavier. >> >> Le 10 août 2010 à 15:42, Daniel França a écrit : >> >> I'm not blaming OSX. >> I just said that it was working on Linux, and now it's not working on Mac. >> and even if my code is wrong that shouldn't be that dificulty to find the >> error, doesn't agree? A more clear error message would help. >> The problem isn't the error, but we are about a month arguing about this >> error, and I'm sure the error message isn't clear enough. >> Maybe it's a silly mistake, but I think I should receive a message that >> clearly say me that. >> >> >> On Tue, Aug 10, 2010 at 10:35 AM, Xavier Ordoquy wrote: >> >>> >>> Le 10 août 2010 à 15:10, Daniel França a écrit : >>> >>> It's very useful Andy, sympathy is welcome =) >>> I was programming under linux, and I guessed that would be really >>> straight forward port my project to OSX, I was wrong :( >>> >>> >>> You know you are unfair. Unless you have strong evidence, you shouldn't >>> blame osx for mistakes you probably made. >>> Actually, your code doesn't work at all. >>> I just gave a try on ubuntu 9.10/Django 1.2/sqlite DB and got the same >>> error as I have on OSX (Error binding parameter 1 - probably unsupported >>> type.). >>> >>> Regards, >>> Xavier. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.
Re: Django on Mac OS X
It is a bit trickier. Pinax application gets all their dependancies through pip installation and requirement files. If you have a pinax application, take a look in the requirements directory. You'll find two files (base.txt and project.txt) that tell exactly what application to get and what versions are needed. Pinax does all the bootstrap processing, so once you installed a pinax application, you already have a working environment. Your application is based on the same common set with Pinax application. However, if you copied the code, you didn't went thought pinax bootstraping operations which would have installed all the required applications with the correct versions. It happens that I am unable to make your application work on osx and Linux with the latest stable django-timezones (0.1.x). However, using the version that Pinax requires (0.2.dev1) it works on both linux and osx. However, you may find other differences if your environments are different. Please google for virtualenv and pip to get the same environment on your various development boxes as well as your production ones and enjoy virtualenv, pip, Python, Django, OSX and Linux :) Regards, Xavier. Le 10 août 2010 à 17:12, Daniel França a écrit : > I bet you installed pinax on your linux box but not on your osx one (or not > in the same virtual env). > hmmm, I just copied the code from Linux to OSX, is it what you mean? I should > have "install" Pinax, that's it? > > On Tue, Aug 10, 2010 at 12:05 PM, Xavier Ordoquy wrote: > > Actually, it doesn't work on Linux either with the same settings. > Please update django-timezones to 0.2.dev2 which is what pinax uses (pip > install --extra-index-url=http://dist.pinaxproject.com/dev/ > django-timezones==0.2.dev1). The latest stable doesn't seem to work with > django 1.2. > I bet you installed pinax on your linux box but not on your osx one (or not > in the same virtual env). > > Regards, > Xavier. > > Le 10 août 2010 à 15:42, Daniel França a écrit : > >> I'm not blaming OSX. >> I just said that it was working on Linux, and now it's not working on Mac. >> and even if my code is wrong that shouldn't be that dificulty to find the >> error, doesn't agree? A more clear error message would help. >> The problem isn't the error, but we are about a month arguing about this >> error, and I'm sure the error message isn't clear enough. >> Maybe it's a silly mistake, but I think I should receive a message that >> clearly say me that. >> >> >> On Tue, Aug 10, 2010 at 10:35 AM, Xavier Ordoquy >> wrote: >> >> Le 10 août 2010 à 15:10, Daniel França a écrit : >> >>> It's very useful Andy, sympathy is welcome =) >>> I was programming under linux, and I guessed that would be really straight >>> forward port my project to OSX, I was wrong :( >> >> You know you are unfair. Unless you have strong evidence, you shouldn't >> blame osx for mistakes you probably made. >> Actually, your code doesn't work at all. >> I just gave a try on ubuntu 9.10/Django 1.2/sqlite DB and got the same error >> as I have on OSX (Error binding parameter 1 - probably unsupported type.). >> >> Regards, >> Xavier. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/dja
Re: Django on Mac OS X
*I bet you installed pinax on your linux box but not on your osx one (or not in the same virtual env).* *hmmm, I just copied the code from Linux to OSX, is it what you mean? I should have "install" Pinax, that's it?* On Tue, Aug 10, 2010 at 12:05 PM, Xavier Ordoquy wrote: > > Actually, it doesn't work on Linux either with the same settings. > Please update django-timezones to 0.2.dev2 which is what pinax uses (pip > install > --extra-index-url=http://dist.pinaxproject.com/dev/django-timezones==0.2.dev1). > The latest stable doesn't seem to work with > django 1.2. > I bet you installed pinax on your linux box but not on your osx one (or not > in the same virtual env). > > Regards, > Xavier. > > Le 10 août 2010 à 15:42, Daniel França a écrit : > > I'm not blaming OSX. > I just said that it was working on Linux, and now it's not working on Mac. > and even if my code is wrong that shouldn't be that dificulty to find the > error, doesn't agree? A more clear error message would help. > The problem isn't the error, but we are about a month arguing about this > error, and I'm sure the error message isn't clear enough. > Maybe it's a silly mistake, but I think I should receive a message that > clearly say me that. > > > On Tue, Aug 10, 2010 at 10:35 AM, Xavier Ordoquy wrote: > >> >> Le 10 août 2010 à 15:10, Daniel França a écrit : >> >> It's very useful Andy, sympathy is welcome =) >> I was programming under linux, and I guessed that would be really straight >> forward port my project to OSX, I was wrong :( >> >> >> You know you are unfair. Unless you have strong evidence, you shouldn't >> blame osx for mistakes you probably made. >> Actually, your code doesn't work at all. >> I just gave a try on ubuntu 9.10/Django 1.2/sqlite DB and got the same >> error as I have on OSX (Error binding parameter 1 - probably unsupported >> type.). >> >> Regards, >> Xavier. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
Actually, it doesn't work on Linux either with the same settings. Please update django-timezones to 0.2.dev2 which is what pinax uses (pip install --extra-index-url=http://dist.pinaxproject.com/dev/ django-timezones==0.2.dev1). The latest stable doesn't seem to work with django 1.2. I bet you installed pinax on your linux box but not on your osx one (or not in the same virtual env). Regards, Xavier. Le 10 août 2010 à 15:42, Daniel França a écrit : > I'm not blaming OSX. > I just said that it was working on Linux, and now it's not working on Mac. > and even if my code is wrong that shouldn't be that dificulty to find the > error, doesn't agree? A more clear error message would help. > The problem isn't the error, but we are about a month arguing about this > error, and I'm sure the error message isn't clear enough. > Maybe it's a silly mistake, but I think I should receive a message that > clearly say me that. > > > On Tue, Aug 10, 2010 at 10:35 AM, Xavier Ordoquy wrote: > > Le 10 août 2010 à 15:10, Daniel França a écrit : > >> It's very useful Andy, sympathy is welcome =) >> I was programming under linux, and I guessed that would be really straight >> forward port my project to OSX, I was wrong :( > > You know you are unfair. Unless you have strong evidence, you shouldn't blame > osx for mistakes you probably made. > Actually, your code doesn't work at all. > I just gave a try on ubuntu 9.10/Django 1.2/sqlite DB and got the same error > as I have on OSX (Error binding parameter 1 - probably unsupported type.). > > Regards, > Xavier. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
I'm not blaming OSX. I just said that it was working on Linux, and now it's not working on Mac. and even if my code is wrong that shouldn't be that dificulty to find the error, doesn't agree? A more clear error message would help. The problem isn't the error, but we are about a month arguing about this error, and I'm sure the error message isn't clear enough. Maybe it's a silly mistake, but I think I should receive a message that clearly say me that. On Tue, Aug 10, 2010 at 10:35 AM, Xavier Ordoquy wrote: > > Le 10 août 2010 à 15:10, Daniel França a écrit : > > It's very useful Andy, sympathy is welcome =) > I was programming under linux, and I guessed that would be really straight > forward port my project to OSX, I was wrong :( > > > You know you are unfair. Unless you have strong evidence, you shouldn't > blame osx for mistakes you probably made. > Actually, your code doesn't work at all. > I just gave a try on ubuntu 9.10/Django 1.2/sqlite DB and got the same > error as I have on OSX (Error binding parameter 1 - probably unsupported > type.). > > Regards, > Xavier. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
Le 10 août 2010 à 15:10, Daniel França a écrit : > It's very useful Andy, sympathy is welcome =) > I was programming under linux, and I guessed that would be really straight > forward port my project to OSX, I was wrong :( You know you are unfair. Unless you have strong evidence, you shouldn't blame osx for mistakes you probably made. Actually, your code doesn't work at all. I just gave a try on ubuntu 9.10/Django 1.2/sqlite DB and got the same error as I have on OSX (Error binding parameter 1 - probably unsupported type.). Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
It's very useful Andy, sympathy is welcome =) I was programming under linux, and I guessed that would be really straight forward port my project to OSX, I was wrong :( > 2010/8/10 AndyB > > I haven't got anything useful to add other than some sympathy. I >> vented my incoherent rage on Twitter a few months ago over how much >> trouble I had getting various Python binaries working. PIL, MySQL- >> Python, lxml and a couple more still plague my fevered dreams... >> >> As a web developer I never really wanted to get knee-deep in gcc and >> make errors. I would love someone cleverer than myself to make the >> experience of getting a fully featured Django install running on OS X >> a little more streamlined. Unfortunately the people with the skills to >> do so are usually the people without the need and the people who need >> one don't have the knowledge to make one. :-( >> >> I know it's not fair to moan when you don't contribute but it's nice >> to share the pain sometimes ;-) >> >> (after writing it I decided not to post this to the forum as I'm not >> saying anything useful but I thought I'd send it to you anyway!) >> >> regards, >> >> Andy Baker > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
I'll try to update my code. On Tue, Aug 10, 2010 at 10:06 AM, Xavier Ordoquy wrote: > Actually I have pinax (trunk) running with the social template and django > 1.2 without issue using sqlite on OSX. > I can change my profile timezone in this application without any issue, > everything seems to be working fine. > > Somehow, the changes you made seem to have messed up something or you don't > use the right pinax/django versions. > > Regards, > Xavier. > > Le 10 août 2010 à 14:21, Daniel França a écrit : > > the log files are for tests purposes only. > I'm inserting the site table myself. > > is it a bug in pinax profiles? accounts? I didn't get the point. > > > On Tue, Aug 10, 2010 at 9:10 AM, Xavier Ordoquy wrote: > >> It is definitively an issue in your code. >> >> syncdb won't run without complaining about the timezone field in your >> account model. >> Once commented, syncdb continues but at some point will fail because it >> expects a site to be configured but at this point, the site table is not >> garanteed to be there... >> >> btw, you also have a couple of hard coded path here and there (the log >> files for example). >> >> Regards, >> Xavier. >> >> Le 10 août 2010 à 13:12, Daniel França a écrit : >> >> ahh... and my code is in github >> if someone wanna test it: http://github.com/danielfranca/Tint >> >> 2010/8/10 Daniel França >> >>> My code is based on Pinax: http://pinaxproject.com/ >>> and the Profile comes from there. >>> >>> >>> On Tue, Aug 10, 2010 at 5:33 AM, tsmets wrote: >>> My feeling is that you are now hitting a bug from your app & not a django / python / mac / ... issue. A stupid gess from me ... You use a Custom Profile for the User and it is an upgrade from Django 1.1 and ... you need to adapt the minor details about it . If you code is in a SVN server I can do a svn export and test it here if you want ... if I do have the same problem ... it is yr app :( \T, On Aug 9, 10:40 pm, Daniel França wrote: > Thanx for all the help, > I tried to run on Sqlite3, and I don't if it's bad or good news, but there's > error even in Sqlite3 > > just when I tried to create the db (syncdb) I get just after I input my > users data or when I try to create a user in shell: > Traceback (most recent call last): > File "manage.py", line 31, in > execute_from_command_line() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 429, in execute_from_command_line > utility.execute() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 347, in handle > return self.handle_noargs(**options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > line 103, in handle_noargs > emit_post_sync_signal(created_models, verbosity, interactive, db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", > line 185, in emit_post_sync_signal > interactive=interactive, db=db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > line 44, in create_superuser > call_command("createsuperuser", interactive=True) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 166, in call_command > return klass.execute(*args, **defaults) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Framewo
Re: Django on Mac OS X
Actually I have pinax (trunk) running with the social template and django 1.2 without issue using sqlite on OSX. I can change my profile timezone in this application without any issue, everything seems to be working fine. Somehow, the changes you made seem to have messed up something or you don't use the right pinax/django versions. Regards, Xavier. Le 10 août 2010 à 14:21, Daniel França a écrit : > the log files are for tests purposes only. > I'm inserting the site table myself. > > is it a bug in pinax profiles? accounts? I didn't get the point. > > > On Tue, Aug 10, 2010 at 9:10 AM, Xavier Ordoquy wrote: > It is definitively an issue in your code. > > syncdb won't run without complaining about the timezone field in your account > model. > Once commented, syncdb continues but at some point will fail because it > expects a site to be configured but at this point, the site table is not > garanteed to be there... > > btw, you also have a couple of hard coded path here and there (the log files > for example). > > Regards, > Xavier. > > Le 10 août 2010 à 13:12, Daniel França a écrit : > >> ahh... and my code is in github >> if someone wanna test it: http://github.com/danielfranca/Tint >> >> 2010/8/10 Daniel França >> My code is based on Pinax: http://pinaxproject.com/ >> and the Profile comes from there. >> >> >> On Tue, Aug 10, 2010 at 5:33 AM, tsmets wrote: >> My feeling is that you are now hitting a bug from your app & not a >> django / python / mac / ... issue. >> A stupid gess from me ... >> You use a Custom Profile for the User and it is an upgrade from Django >> 1.1 and ... you need to adapt the minor details about it . >> If you code is in a SVN server I can do a svn export and test it here >> if you want ... if I do have the same problem ... it is yr app :( >> >> \T, >> >> >> >> On Aug 9, 10:40 pm, Daniel França wrote: >> > Thanx for all the help, >> > I tried to run on Sqlite3, and I don't if it's bad or good news, but >> > there's >> > error even in Sqlite3 >> > >> > just when I tried to create the db (syncdb) I get just after I input my >> > users data or when I try to create a user in shell: >> > Traceback (most recent call last): >> > File "manage.py", line 31, in >> > execute_from_command_line() >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >> > line 429, in execute_from_command_line >> > utility.execute() >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >> > line 379, in execute >> > self.fetch_command(subcommand).run_from_argv(self.argv) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 191, in run_from_argv >> > self.execute(*args, **options.__dict__) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 218, in execute >> > output = self.handle(*args, **options) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 347, in handle >> > return self.handle_noargs(**options) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", >> > line 103, in handle_noargs >> > emit_post_sync_signal(created_models, verbosity, interactive, db) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", >> > line 185, in emit_post_sync_signal >> > interactive=interactive, db=db) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", >> > line 162, in send >> > response = receiver(signal=self, sender=sender, **named) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", >> > line 44, in create_superuser >> > call_command("createsuperuser", interactive=True) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >> > line 166, in call_command >> > return klass.execute(*args, **defaults) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 218, in execute >> > output = self.handle(*args, **options) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", >> > line 134, in handle >> > User.objects.create_superuser(username, email, password) >> > File >> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django
Re: Django on Mac OS X
the log files are for tests purposes only. I'm inserting the site table myself. is it a bug in pinax profiles? accounts? I didn't get the point. On Tue, Aug 10, 2010 at 9:10 AM, Xavier Ordoquy wrote: > It is definitively an issue in your code. > > syncdb won't run without complaining about the timezone field in your > account model. > Once commented, syncdb continues but at some point will fail because it > expects a site to be configured but at this point, the site table is not > garanteed to be there... > > btw, you also have a couple of hard coded path here and there (the log > files for example). > > Regards, > Xavier. > > Le 10 août 2010 à 13:12, Daniel França a écrit : > > ahh... and my code is in github > if someone wanna test it: http://github.com/danielfranca/Tint > > 2010/8/10 Daniel França > >> My code is based on Pinax: http://pinaxproject.com/ >> and the Profile comes from there. >> >> >> On Tue, Aug 10, 2010 at 5:33 AM, tsmets wrote: >> >>> My feeling is that you are now hitting a bug from your app & not a >>> django / python / mac / ... issue. >>> A stupid gess from me ... >>> You use a Custom Profile for the User and it is an upgrade from Django >>> 1.1 and ... you need to adapt the minor details about it . >>> If you code is in a SVN server I can do a svn export and test it here >>> if you want ... if I do have the same problem ... it is yr app :( >>> >>> \T, >>> >>> >>> >>> On Aug 9, 10:40 pm, Daniel França wrote: >>> > Thanx for all the help, >>> > I tried to run on Sqlite3, and I don't if it's bad or good news, but >>> there's >>> > error even in Sqlite3 >>> > >>> > just when I tried to create the db (syncdb) I get just after I input my >>> > users data or when I try to create a user in shell: >>> > Traceback (most recent call last): >>> > File "manage.py", line 31, in >>> > execute_from_command_line() >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >>> > line 429, in execute_from_command_line >>> > utility.execute() >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >>> > line 379, in execute >>> > self.fetch_command(subcommand).run_from_argv(self.argv) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >>> > line 191, in run_from_argv >>> > self.execute(*args, **options.__dict__) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >>> > line 218, in execute >>> > output = self.handle(*args, **options) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >>> > line 347, in handle >>> > return self.handle_noargs(**options) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", >>> > line 103, in handle_noargs >>> > emit_post_sync_signal(created_models, verbosity, interactive, db) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", >>> > line 185, in emit_post_sync_signal >>> > interactive=interactive, db=db) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", >>> > line 162, in send >>> > response = receiver(signal=self, sender=sender, **named) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", >>> > line 44, in create_superuser >>> > call_command("createsuperuser", interactive=True) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >>> > line 166, in call_command >>> > return klass.execute(*args, **defaults) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >>> > line 218, in execute >>> > output = self.handle(*args, **options) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", >>> > line 134, in handle >>> > User.objects.create_superuser(username, email, password) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", >>> > line 133, in create_superuser >>> > u = self.create_user(username, email, password) >>> > File >>> > >>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", >>> > line 129, in create_user >>> > user.save(using=self
Re: Django on Mac OS X
It is definitively an issue in your code. syncdb won't run without complaining about the timezone field in your account model. Once commented, syncdb continues but at some point will fail because it expects a site to be configured but at this point, the site table is not garanteed to be there... btw, you also have a couple of hard coded path here and there (the log files for example). Regards, Xavier. Le 10 août 2010 à 13:12, Daniel França a écrit : > ahh... and my code is in github > if someone wanna test it: http://github.com/danielfranca/Tint > > 2010/8/10 Daniel França > My code is based on Pinax: http://pinaxproject.com/ > and the Profile comes from there. > > > On Tue, Aug 10, 2010 at 5:33 AM, tsmets wrote: > My feeling is that you are now hitting a bug from your app & not a > django / python / mac / ... issue. > A stupid gess from me ... > You use a Custom Profile for the User and it is an upgrade from Django > 1.1 and ... you need to adapt the minor details about it . > If you code is in a SVN server I can do a svn export and test it here > if you want ... if I do have the same problem ... it is yr app :( > > \T, > > > > On Aug 9, 10:40 pm, Daniel França wrote: > > Thanx for all the help, > > I tried to run on Sqlite3, and I don't if it's bad or good news, but there's > > error even in Sqlite3 > > > > just when I tried to create the db (syncdb) I get just after I input my > > users data or when I try to create a user in shell: > > Traceback (most recent call last): > > File "manage.py", line 31, in > > execute_from_command_line() > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > > line 429, in execute_from_command_line > > utility.execute() > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > > line 379, in execute > > self.fetch_command(subcommand).run_from_argv(self.argv) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 191, in run_from_argv > > self.execute(*args, **options.__dict__) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 218, in execute > > output = self.handle(*args, **options) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 347, in handle > > return self.handle_noargs(**options) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > > line 103, in handle_noargs > > emit_post_sync_signal(created_models, verbosity, interactive, db) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", > > line 185, in emit_post_sync_signal > > interactive=interactive, db=db) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > > line 162, in send > > response = receiver(signal=self, sender=sender, **named) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > > line 44, in create_superuser > > call_command("createsuperuser", interactive=True) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > > line 166, in call_command > > return klass.execute(*args, **defaults) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 218, in execute > > output = self.handle(*args, **options) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", > > line 134, in handle > > User.objects.create_superuser(username, email, password) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > > line 133, in create_superuser > > u = self.create_user(username, email, password) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > > line 129, in create_user > > user.save(using=self._db) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 435, in save > > self.save_base(using=using, force_insert=force_insert, > > force_update=force_update) > > File > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 543, in save_base > > created=(not record_exists), raw=raw) > > Fil
Re: Django on Mac OS X
ahh... and my code is in github if someone wanna test it: http://github.com/danielfranca/Tint 2010/8/10 Daniel França > My code is based on Pinax: http://pinaxproject.com/ > and the Profile comes from there. > > > On Tue, Aug 10, 2010 at 5:33 AM, tsmets wrote: > >> My feeling is that you are now hitting a bug from your app & not a >> django / python / mac / ... issue. >> A stupid gess from me ... >> You use a Custom Profile for the User and it is an upgrade from Django >> 1.1 and ... you need to adapt the minor details about it . >> If you code is in a SVN server I can do a svn export and test it here >> if you want ... if I do have the same problem ... it is yr app :( >> >> \T, >> >> >> >> On Aug 9, 10:40 pm, Daniel França wrote: >> > Thanx for all the help, >> > I tried to run on Sqlite3, and I don't if it's bad or good news, but >> there's >> > error even in Sqlite3 >> > >> > just when I tried to create the db (syncdb) I get just after I input my >> > users data or when I try to create a user in shell: >> > Traceback (most recent call last): >> > File "manage.py", line 31, in >> > execute_from_command_line() >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >> > line 429, in execute_from_command_line >> > utility.execute() >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >> > line 379, in execute >> > self.fetch_command(subcommand).run_from_argv(self.argv) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 191, in run_from_argv >> > self.execute(*args, **options.__dict__) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 218, in execute >> > output = self.handle(*args, **options) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 347, in handle >> > return self.handle_noargs(**options) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", >> > line 103, in handle_noargs >> > emit_post_sync_signal(created_models, verbosity, interactive, db) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", >> > line 185, in emit_post_sync_signal >> > interactive=interactive, db=db) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", >> > line 162, in send >> > response = receiver(signal=self, sender=sender, **named) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", >> > line 44, in create_superuser >> > call_command("createsuperuser", interactive=True) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", >> > line 166, in call_command >> > return klass.execute(*args, **defaults) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", >> > line 218, in execute >> > output = self.handle(*args, **options) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", >> > line 134, in handle >> > User.objects.create_superuser(username, email, password) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", >> > line 133, in create_superuser >> > u = self.create_user(username, email, password) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", >> > line 129, in create_user >> > user.save(using=self._db) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", >> > line 435, in save >> > self.save_base(using=using, force_insert=force_insert, >> > force_update=force_update) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", >> > line 543, in save_base >> > created=(not record_exists), raw=raw) >> > File >> > >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", >> > line 162, in send >> > response = receiver(signal=self, sender=sender, **named) >> > File >> > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", >> > line 61, in create_account >>
Re: Django on Mac OS X
My code is based on Pinax: http://pinaxproject.com/ and the Profile comes from there. On Tue, Aug 10, 2010 at 5:33 AM, tsmets wrote: > My feeling is that you are now hitting a bug from your app & not a > django / python / mac / ... issue. > A stupid gess from me ... > You use a Custom Profile for the User and it is an upgrade from Django > 1.1 and ... you need to adapt the minor details about it . > If you code is in a SVN server I can do a svn export and test it here > if you want ... if I do have the same problem ... it is yr app :( > > \T, > > > > On Aug 9, 10:40 pm, Daniel França wrote: > > Thanx for all the help, > > I tried to run on Sqlite3, and I don't if it's bad or good news, but > there's > > error even in Sqlite3 > > > > just when I tried to create the db (syncdb) I get just after I input my > > users data or when I try to create a user in shell: > > Traceback (most recent call last): > > File "manage.py", line 31, in > > execute_from_command_line() > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > > line 429, in execute_from_command_line > > utility.execute() > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > > line 379, in execute > > self.fetch_command(subcommand).run_from_argv(self.argv) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 191, in run_from_argv > > self.execute(*args, **options.__dict__) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 218, in execute > > output = self.handle(*args, **options) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 347, in handle > > return self.handle_noargs(**options) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > > line 103, in handle_noargs > > emit_post_sync_signal(created_models, verbosity, interactive, db) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", > > line 185, in emit_post_sync_signal > > interactive=interactive, db=db) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > > line 162, in send > > response = receiver(signal=self, sender=sender, **named) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > > line 44, in create_superuser > > call_command("createsuperuser", interactive=True) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > > line 166, in call_command > > return klass.execute(*args, **defaults) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > > line 218, in execute > > output = self.handle(*args, **options) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", > > line 134, in handle > > User.objects.create_superuser(username, email, password) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > > line 133, in create_superuser > > u = self.create_user(username, email, password) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > > line 129, in create_user > > user.save(using=self._db) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 435, in save > > self.save_base(using=using, force_insert=force_insert, > > force_update=force_update) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 543, in save_base > > created=(not record_exists), raw=raw) > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > > line 162, in send > > response = receiver(signal=self, sender=sender, **named) > > File > > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > > line 61, in create_account > > account, created = > > Account.objects.get_or_create(user=instance,timezone='America/Sao_Paulo') > > File > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > > line 135, i
Re: Django on Mac OS X
My feeling is that you are now hitting a bug from your app & not a django / python / mac / ... issue. A stupid gess from me ... You use a Custom Profile for the User and it is an upgrade from Django 1.1 and ... you need to adapt the minor details about it . If you code is in a SVN server I can do a svn export and test it here if you want ... if I do have the same problem ... it is yr app :( \T, On Aug 9, 10:40 pm, Daniel França wrote: > Thanx for all the help, > I tried to run on Sqlite3, and I don't if it's bad or good news, but there's > error even in Sqlite3 > > just when I tried to create the db (syncdb) I get just after I input my > users data or when I try to create a user in shell: > Traceback (most recent call last): > File "manage.py", line 31, in > execute_from_command_line() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 429, in execute_from_command_line > utility.execute() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 347, in handle > return self.handle_noargs(**options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > line 103, in handle_noargs > emit_post_sync_signal(created_models, verbosity, interactive, db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", > line 185, in emit_post_sync_signal > interactive=interactive, db=db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > line 44, in create_superuser > call_command("createsuperuser", interactive=True) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 166, in call_command > return klass.execute(*args, **defaults) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", > line 134, in handle > User.objects.create_superuser(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 133, in create_superuser > u = self.create_user(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 129, in create_user > user.save(using=self._db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 435, in save > self.save_base(using=using, force_insert=force_insert, > force_update=force_update) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 543, in save_base > created=(not record_exists), raw=raw) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > line 61, in create_account > account, created = > Account.objects.get_or_create(user=instance,timezone='America/Sao_Paulo') > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > line 135, in get_or_create > return self.get_query_set().get_or_create(**kwargs) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > line 366, in get_or_create > return self.get(**kwargs), False > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/q
Re: Django on Mac OS X
Hi, thanks, I didn't know this werkzeug debuger. Now I can see exactly where it raises the error and can print the variables values, here's the output with some values: File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line *200*, in execute return Database.Cursor.execute(self, query, params) [console ready] >>> print params (1, , u'pt-br') >>> print self >>> print query INSERT INTO "account_account" ("user_id", "timezone", "language") VALUES (?, ?, ?) >>> print params[1] America/Sao_Paulo >>> print params[0] 1 >>> print params[2] pt-br Any idea? On Mon, Aug 9, 2010 at 8:48 PM, Xavier Ordoquy wrote: > Please, install django_extentions, werkzeug debuger and try to see what > exactly where the issue is with the runserver_plus command (in browser > debugger so you'll get the variables that are missing here. > Most probably, your timezone field causes the issue. > > Regards, > Xavier. > > Le 9 août 2010 à 22:40, Daniel França a écrit : > > Thanx for all the help, > I tried to run on Sqlite3, and I don't if it's bad or good news, but > there's error even in Sqlite3 > > just when I tried to create the db (syncdb) I get just after I input my > users data or when I try to create a user in shell: > Traceback (most recent call last): > File "manage.py", line 31, in > execute_from_command_line() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 429, in execute_from_command_line > utility.execute() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 347, in handle > return self.handle_noargs(**options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > line 103, in handle_noargs > emit_post_sync_signal(created_models, verbosity, interactive, db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", > line 185, in emit_post_sync_signal > interactive=interactive, db=db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > line 44, in create_superuser > call_command("createsuperuser", interactive=True) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 166, in call_command > return klass.execute(*args, **defaults) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", > line 134, in handle > User.objects.create_superuser(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 133, in create_superuser > u = self.create_user(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 129, in create_user > user.save(using=self._db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 435, in save > self.save_base(using=using, force_insert=force_insert, > force_update=force_update) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 543, in save_base > created=(not record_exists), raw=raw) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > line 61, in create_account > account, cre
Re: Django on Mac OS X
Please, install django_extentions, werkzeug debuger and try to see what exactly where the issue is with the runserver_plus command (in browser debugger so you'll get the variables that are missing here. Most probably, your timezone field causes the issue. Regards, Xavier. Le 9 août 2010 à 22:40, Daniel França a écrit : > Thanx for all the help, > I tried to run on Sqlite3, and I don't if it's bad or good news, but there's > error even in Sqlite3 > > just when I tried to create the db (syncdb) I get just after I input my users > data or when I try to create a user in shell: > Traceback (most recent call last): > File "manage.py", line 31, in > execute_from_command_line() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 429, in execute_from_command_line > utility.execute() > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 379, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 191, in run_from_argv > self.execute(*args, **options.__dict__) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 347, in handle > return self.handle_noargs(**options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", > line 103, in handle_noargs > emit_post_sync_signal(created_models, verbosity, interactive, db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", > line 185, in emit_post_sync_signal > interactive=interactive, db=db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", > line 44, in create_superuser > call_command("createsuperuser", interactive=True) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", > line 166, in call_command > return klass.execute(*args, **defaults) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", > line 218, in execute > output = self.handle(*args, **options) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", > line 134, in handle > User.objects.create_superuser(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 133, in create_superuser > u = self.create_user(username, email, password) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 129, in create_user > user.save(using=self._db) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 435, in save > self.save_base(using=using, force_insert=force_insert, > force_update=force_update) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 543, in save_base > created=(not record_exists), raw=raw) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send > response = receiver(signal=self, sender=sender, **named) > File > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", line > 61, in create_account > account, created = > Account.objects.get_or_create(user=instance,timezone='America/Sao_Paulo') > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > line 135, in get_or_create > return self.get_query_set().get_or_create(**kwargs) > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > line 366, in get_or_create > return self.get(**kwargs), False > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > line 336, in get > num = len(clone) > File > "/Libra
Re: Django on Mac OS X
Thanx for all the help, I tried to run on Sqlite3, and I don't if it's bad or good news, but there's error even in Sqlite3 just when I tried to create the db (syncdb) I get just after I input my users data or when I try to create a user in shell: Traceback (most recent call last): File "manage.py", line 31, in execute_from_command_line() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line utility.execute() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 218, in execute output = self.handle(*args, **options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 347, in handle return self.handle_noargs(**options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 103, in handle_noargs emit_post_sync_signal(created_models, verbosity, interactive, db) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/sql.py", line 185, in emit_post_sync_signal interactive=interactive, db=db) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 162, in send response = receiver(signal=self, sender=sender, **named) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py", line 44, in create_superuser call_command("createsuperuser", interactive=True) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/__init__.py", line 166, in call_command return klass.execute(*args, **defaults) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/base.py", line 218, in execute output = self.handle(*args, **options) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 134, in handle User.objects.create_superuser(username, email, password) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", line 133, in create_superuser u = self.create_user(username, email, password) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", line 129, in create_user user.save(using=self._db) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 435, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 543, in save_base created=(not record_exists), raw=raw) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 162, in send response = receiver(signal=self, sender=sender, **named) File "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", line 61, in create_account account, created = Account.objects.get_or_create(user=instance,timezone='America/Sao_Paulo') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", line 135, in get_or_create return self.get_query_set().get_or_create(**kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 366, in get_or_create return self.get(**kwargs), False File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 336, in get num = len(clone) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 81, in __len__ self._result_cache = list(self.iterator()) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 269, in iterator for row in compiler.results_iter(): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 672, in results_iter for rows in self.execute_sql(MULTI): File "/Library/Frameworks/Python.f
Re: Django on Mac OS X
I use PostgreSQL on my Mac as well as MySQL, and I've had many fewer problems with PostgreSQL than I've had with MySQL. My personal opinion: Ignore all the ports/fink stuff, and get a good native PostgreSQL install: http://postgresqlformac.com The 8.4.3 installer has some known problems (easy to fix if you know what they are, but easier to avoid if this is your first time), but other than that, this is a pretty reliable source of installers and native tools. Once you've got the database installed, psycopg2 installs from source fairly cleanly. Yours, Russ Magee %-) On 8/9/10, lukaszb wrote: > I haven't read all the comments here but if you've just started > working on osx you should definitely check out > http://github.com/mxcl/homebrew > - it's a package manager which works like a charm most of the time. > > Installation is extremely simple (there is even one-liner available). > If your problem is related with wrong packages installation - homebrew > would most probably fix all of them, if only you can get rid of those > ports/finks at the first place. > > Regards, > Lukasz > > On Aug 9, 2:04 pm, Xavier Ordoquy wrote: >> I doubt it's a mac issue. >> I already ran in a couple of very painful issues with postgresql on Linux >> while having no issue with mysql on mac. >> My feeling is that postgresql require far more attention than mysql and is >> more sensitive to small changes. >> >> Regards, >> Xavier. >> >> Le 9 août 2010 à 05:32, Daniel França a écrit : >> >> >> >> > I tried to reinstall everything... installing python+postgres from ports >> > and I get the Symbol not found: _PQbackendPID error again from psycopg. >> > I guess the best solution is run Ubuntu on a virtual machine or my >> > project will be stuck forever. >> > python+psycopg on mac just sux. >> >> > 2010/8/8 Daniel França >> > tried, nothing :( >> > I'm getting crazy with Mac OS, I think I'll go back to Linux :S >> >> > On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy >> > wrote: >> > It won't work by commenting the timezone field since it has been created >> > with a non null constraint on your db. >> > Have you tried to get_or_create the account with timezone and language >> > set to some value ? >> >> > Regards, >> > Xavier. >> >> > Le 8 août 2010 à 04:09, Daniel França a écrit : >> >> >> More information. >> >> here: >> >> def create_account(sender, instance=None, **kwargs): >> >> if instance is None: >> >> return >> >> account, created = Account.objects.get_or_create(user=instance) >> >> >> post_save.connect(create_account, sender=User) >> >> >> If I comment the post_save.connect, there's no exception =) but, of >> >> course the code doesn't do what it should do. >> >> >> So, I don't know why, but the error is in the connect... maybe because >> >> of timezone attribute of user >> >> anyone has any idea? >> >> >> 2010/8/7 Daniel França >> >> Xavier, I think we are almost there :P >> >> because there's a timezone field in my account model: >> >> >> class Account(models.Model): >> >> >> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) >> >> >> timezone = TimeZoneField(_('timezone')) >> >> language = models.CharField(_('language'), max_length=10, >> >> choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) >> >> >> def __unicode__(self): >> >> return self.user.username >> >> >> I tried to comment the line, but then the create_user abort with an >> >> constraint timezone error. >> >> >> On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy >> >> wrote: >> >> And what's your Account model ? >> >> I noticed it is in its get_or_create that you get the error. >> >> >> Regards, >> >> Xavier. >> >> >> Le 7 août 2010 à 18:52, Daniel França a écrit : >> >> >>> Same error =/ >> >>> but now,I don't know why.. it's saving at the db. The error still >> >>> happens, but the data is in the database >> >> >>> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy >> >>> wrote: >> >>> Sorry, I just woke up form a sleep :) >> >>> I notice you get-or-create a user. >> >>> However, did you try to call get or create with specifying the >> >>> arguments ? first_name = "...", and so on ? >> >>> Does it still give an error ? >> >> >>> Regards, >> >>> Xavier. >> >> >>> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : >> >> I just googled your error and found: >> http://www.nerdydork.com/django-programmingerror-cant-adapt.html >> According to the first comment, you might do something wrong with the >> arguments types. >> Unless you give a table description (\d from psql shell) and the >> model I'm not sure I can help you further. >> >> Regards, >> Xavier. >> >> As the stack seems to have a >> >> Le 7 août 2010 à 17:21, Daniel França a écrit : >> >> > I just created my db using django manage syncdb, I think it should >> > create right. >> > or how can I see the encode of each tables? >> > I'm using postgresql 8.4 >> > maybe I'll need rei
Re: Django on Mac OS X
Daniel, Did you manage to have the application running on sqlite3 ... ? I develop on Mac & have few issues... so may be you could first ensure everything is working without postgresql connector ... ? \T, On Aug 9, 4:24 am, Daniel França wrote: > tried, nothing :( > I'm getting crazy with Mac OS, I think I'll go back to Linux :S > > On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy wrote: > > It won't work by commenting the timezone field since it has been created > > with a non null constraint on your db. > > Have you tried to get_or_create the account with timezone and language set > > to some value ? > > > Regards, > > Xavier. > > > Le 8 août 2010 à 04:09, Daniel França a écrit : > > > More information. > > here: > > def create_account(sender, instance=None, **kwargs): > > if instance is None: > > return > > account, created = Account.objects.get_or_create(user=instance) > > > post_save.connect(create_account, sender=User) > > > If I comment the *post_save.connect*, there's no exception =) but, of > > course the code doesn't do what it should do. > > > So, I don't know why, but the error is in the connect... maybe because of > > timezone attribute of user > > anyone has any idea? > > > 2010/8/7 Daniel França > > >> Xavier, I think we are almost there :P > >> because there's a timezone field in my account model: > > >> class Account(models.Model): > > >> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) > > >> timezone = TimeZoneField(_('timezone')) > >> language = models.CharField(_('language'), max_length=10, > >> choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) > > >> def __unicode__(self): > >> return self.user.username > > >> I tried to comment the line, but then the create_user abort with an > >> constraint timezone error. > > >> On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: > > >>> And what's your Account model ? > >>> I noticed it is in its get_or_create that you get the error. > > >>> Regards, > >>> Xavier. > > >>> Le 7 août 2010 à 18:52, Daniel França a écrit : > > >>> Same error =/ > >>> but now,I don't know why.. it's saving at the db. The error still > >>> happens, but the data is in the database > > >>> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy > >>> wrote: > > Sorry, I just woke up form a sleep :) > I notice you get-or-create a user. > However, did you try to call get or create with specifying the arguments > ? first_name = "...", and so on ? > Does it still give an error ? > > Regards, > Xavier. > > Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > > I just googled your error and found: > http://www.nerdydork.com/django-programmingerror-cant-adapt.html > According to the first comment, you might do something wrong with the > arguments types. > Unless you give a table description (\d from psql shell) and the model > I'm not sure I can help you further. > > Regards, > Xavier. > > As the stack seems to have a > > Le 7 août 2010 à 17:21, Daniel França a écrit : > > I just created my db using django manage syncdb, I think it should > create right. > or how can I see the encode of each tables? > I'm using postgresql 8.4 > maybe I'll need reinstall everything =S > > On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy > wrote: > > > Le 7 août 2010 à 06:44, Daniel França a écrit : > > > > My database is UTF-8, it's fine, doesn't?. > > > I'm afraid to reinstall everything from ports and start to get a lot > > 64-32 bits incompatible issues like happened before =/ > > > I think that should be fine with a utf-8 DB. > > Are you sure your tables are UTF-8 ? > > What database are you using ? mysql ? postgres ? I had no issue with > > both and I have a couple of non pure ascii sites. > > However, when I moved to snow leopard, I recompiled mysql/postgres and > > the python drivers. > > > Regards, > > Xavier. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this
Re: Django on Mac OS X
I haven't read all the comments here but if you've just started working on osx you should definitely check out http://github.com/mxcl/homebrew - it's a package manager which works like a charm most of the time. Installation is extremely simple (there is even one-liner available). If your problem is related with wrong packages installation - homebrew would most probably fix all of them, if only you can get rid of those ports/finks at the first place. Regards, Lukasz On Aug 9, 2:04 pm, Xavier Ordoquy wrote: > I doubt it's a mac issue. > I already ran in a couple of very painful issues with postgresql on Linux > while having no issue with mysql on mac. > My feeling is that postgresql require far more attention than mysql and is > more sensitive to small changes. > > Regards, > Xavier. > > Le 9 août 2010 à 05:32, Daniel França a écrit : > > > > > I tried to reinstall everything... installing python+postgres from ports > > and I get the Symbol not found: _PQbackendPID error again from psycopg. > > I guess the best solution is run Ubuntu on a virtual machine or my project > > will be stuck forever. > > python+psycopg on mac just sux. > > > 2010/8/8 Daniel França > > tried, nothing :( > > I'm getting crazy with Mac OS, I think I'll go back to Linux :S > > > On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy wrote: > > It won't work by commenting the timezone field since it has been created > > with a non null constraint on your db. > > Have you tried to get_or_create the account with timezone and language set > > to some value ? > > > Regards, > > Xavier. > > > Le 8 août 2010 à 04:09, Daniel França a écrit : > > >> More information. > >> here: > >> def create_account(sender, instance=None, **kwargs): > >> if instance is None: > >> return > >> account, created = Account.objects.get_or_create(user=instance) > > >> post_save.connect(create_account, sender=User) > > >> If I comment the post_save.connect, there's no exception =) but, of course > >> the code doesn't do what it should do. > > >> So, I don't know why, but the error is in the connect... maybe because of > >> timezone attribute of user > >> anyone has any idea? > > >> 2010/8/7 Daniel França > >> Xavier, I think we are almost there :P > >> because there's a timezone field in my account model: > > >> class Account(models.Model): > > >> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) > > >> timezone = TimeZoneField(_('timezone')) > >> language = models.CharField(_('language'), max_length=10, > >> choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) > > >> def __unicode__(self): > >> return self.user.username > > >> I tried to comment the line, but then the create_user abort with an > >> constraint timezone error. > > >> On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy > >> wrote: > >> And what's your Account model ? > >> I noticed it is in its get_or_create that you get the error. > > >> Regards, > >> Xavier. > > >> Le 7 août 2010 à 18:52, Daniel França a écrit : > > >>> Same error =/ > >>> but now,I don't know why.. it's saving at the db. The error still > >>> happens, but the data is in the database > > >>> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy > >>> wrote: > >>> Sorry, I just woke up form a sleep :) > >>> I notice you get-or-create a user. > >>> However, did you try to call get or create with specifying the arguments > >>> ? first_name = "...", and so on ? > >>> Does it still give an error ? > > >>> Regards, > >>> Xavier. > > >>> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > > I just googled your error and found: > http://www.nerdydork.com/django-programmingerror-cant-adapt.html > According to the first comment, you might do something wrong with the > arguments types. > Unless you give a table description (\d from psql shell) and the model > I'm not sure I can help you further. > > Regards, > Xavier. > > As the stack seems to have a > > Le 7 août 2010 à 17:21, Daniel França a écrit : > > > I just created my db using django manage syncdb, I think it should > > create right. > > or how can I see the encode of each tables? > > I'm using postgresql 8.4 > > maybe I'll need reinstall everything =S > > > On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy > > wrote: > > > Le 7 août 2010 à 06:44, Daniel França a écrit : > > > > My database is UTF-8, it's fine, doesn't?. > > > I'm afraid to reinstall everything from ports and start to get a lot > > > 64-32 bits incompatible issues like happened before =/ > > > I think that should be fine with a utf-8 DB. > > Are you sure your tables are UTF-8 ? > > What database are you using ? mysql ? postgres ? I had no issue with > > both and I have a couple of non pure ascii sites. > > However, when I moved to snow leopard, I recompiled mysql/postgres and > > the python drivers. > > > Regards, > > Xavier.
Re: Django on Mac OS X
I doubt it's a mac issue. I already ran in a couple of very painful issues with postgresql on Linux while having no issue with mysql on mac. My feeling is that postgresql require far more attention than mysql and is more sensitive to small changes. Regards, Xavier. Le 9 août 2010 à 05:32, Daniel França a écrit : > I tried to reinstall everything... installing python+postgres from ports > and I get the Symbol not found: _PQbackendPID error again from psycopg. > I guess the best solution is run Ubuntu on a virtual machine or my project > will be stuck forever. > python+psycopg on mac just sux. > > > 2010/8/8 Daniel França > tried, nothing :( > I'm getting crazy with Mac OS, I think I'll go back to Linux :S > > > On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy wrote: > It won't work by commenting the timezone field since it has been created with > a non null constraint on your db. > Have you tried to get_or_create the account with timezone and language set to > some value ? > > Regards, > Xavier. > > Le 8 août 2010 à 04:09, Daniel França a écrit : > >> More information. >> here: >> def create_account(sender, instance=None, **kwargs): >> if instance is None: >> return >> account, created = Account.objects.get_or_create(user=instance) >> >> post_save.connect(create_account, sender=User) >> >> If I comment the post_save.connect, there's no exception =) but, of course >> the code doesn't do what it should do. >> >> So, I don't know why, but the error is in the connect... maybe because of >> timezone attribute of user >> anyone has any idea? >> >> 2010/8/7 Daniel França >> Xavier, I think we are almost there :P >> because there's a timezone field in my account model: >> >> class Account(models.Model): >> >> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) >> >> timezone = TimeZoneField(_('timezone')) >> language = models.CharField(_('language'), max_length=10, >> choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) >> >> def __unicode__(self): >> return self.user.username >> >> I tried to comment the line, but then the create_user abort with an >> constraint timezone error. >> >> On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: >> And what's your Account model ? >> I noticed it is in its get_or_create that you get the error. >> >> Regards, >> Xavier. >> >> Le 7 août 2010 à 18:52, Daniel França a écrit : >> >>> Same error =/ >>> but now,I don't know why.. it's saving at the db. The error still happens, >>> but the data is in the database >>> >>> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy >>> wrote: >>> Sorry, I just woke up form a sleep :) >>> I notice you get-or-create a user. >>> However, did you try to call get or create with specifying the arguments ? >>> first_name = "...", and so on ? >>> Does it still give an error ? >>> >>> Regards, >>> Xavier. >>> >>> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : >>> I just googled your error and found: http://www.nerdydork.com/django-programmingerror-cant-adapt.html According to the first comment, you might do something wrong with the arguments types. Unless you give a table description (\d from psql shell) and the model I'm not sure I can help you further. Regards, Xavier. As the stack seems to have a Le 7 août 2010 à 17:21, Daniel França a écrit : > I just created my db using django manage syncdb, I think it should create > right. > or how can I see the encode of each tables? > I'm using postgresql 8.4 > maybe I'll need reinstall everything =S > > On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy > wrote: > > Le 7 août 2010 à 06:44, Daniel França a écrit : > > > My database is UTF-8, it's fine, doesn't?. > > I'm afraid to reinstall everything from ports and start to get a lot > > 64-32 bits incompatible issues like happened before =/ > > I think that should be fine with a utf-8 DB. > Are you sure your tables are UTF-8 ? > What database are you using ? mysql ? postgres ? I had no issue with both > and I have a couple of non pure ascii sites. > However, when I moved to snow leopard, I recompiled mysql/postgres and > the python drivers. > > Regards, > Xavier. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegrou
Re: Django on Mac OS X
yeah, psycopg2 On Mon, Aug 9, 2010 at 1:27 AM, Sam Lai wrote: > 2010/8/9 Daniel França : > > I tried to reinstall everything... installing python+postgres from ports > > and I get the Symbol not found: _PQbackendPID error again from psycopg. > > I guess the best solution is run Ubuntu on a virtual machine or my > project > > will be stuck forever. > > python+psycopg on mac just sux. > > I haven't really been following this thread, but you meant psycopg2, > not psycopg right? psycopg is old and unsupported as far as I know. > > > > > 2010/8/8 Daniel França > >> > >> tried, nothing :( > >> I'm getting crazy with Mac OS, I think I'll go back to Linux :S > >> > >> On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy > >> wrote: > >>> > >>> It won't work by commenting the timezone field since it has been > created > >>> with a non null constraint on your db. > >>> Have you tried to get_or_create the account with timezone and language > >>> set to some value ? > >>> Regards, > >>> Xavier. > >>> > >>> Le 8 août 2010 à 04:09, Daniel França a écrit : > >>> > >>> More information. > >>> here: > >>> def create_account(sender, instance=None, **kwargs): > >>> if instance is None: > >>> return > >>> account, created = Account.objects.get_or_create(user=instance) > >>> post_save.connect(create_account, sender=User) > >>> If I comment the post_save.connect, there's no exception =) but, of > >>> course the code doesn't do what it should do. > >>> So, I don't know why, but the error is in the connect... maybe because > of > >>> timezone attribute of user > >>> anyone has any idea? > >>> 2010/8/7 Daniel França > > Xavier, I think we are almost there :P > because there's a timezone field in my account model: > class Account(models.Model): > > user = models.ForeignKey(User, unique=True, > verbose_name=_('user')) > > timezone = TimeZoneField(_('timezone')) > language = models.CharField(_('language'), max_length=10, > choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) > > def __unicode__(self): > return self.user.username > I tried to comment the line, but then the create_user abort with an > constraint timezone error. > On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy > wrote: > > > > And what's your Account model ? > > I noticed it is in its get_or_create that you get the error. > > Regards, > > Xavier. > > > > Le 7 août 2010 à 18:52, Daniel França a écrit : > > > > Same error =/ > > but now,I don't know why.. it's saving at the db. The error still > > happens, but the data is in the database > > > > On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy < > xordo...@linovia.com> > > wrote: > >> > >> Sorry, I just woke up form a sleep :) > >> I notice you get-or-create a user. > >> However, did you try to call get or create with specifying the > >> arguments ? first_name = "...", and so on ? > >> Does it still give an error ? > >> Regards, > >> Xavier. > >> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > >> > >> I just googled your error and found: > >> http://www.nerdydork.com/django-programmingerror-cant-adapt.html > >> According to the first comment, you might do something wrong with > the > >> arguments types. > >> Unless you give a table description (\d from psql shell) and the > model > >> I'm not sure I can help you further. > >> Regards, > >> Xavier. > >> As the stack seems to have a > >> Le 7 août 2010 à 17:21, Daniel França a écrit : > >> > >> I just created my db using django manage syncdb, I think it should > >> create right. > >> or how can I see the encode of each tables? > >> I'm using postgresql 8.4 > >> maybe I'll need reinstall everything =S > >> > >> On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy < > xordo...@linovia.com> > >> wrote: > >>> > >>> Le 7 août 2010 à 06:44, Daniel França a écrit : > >>> > >>> > My database is UTF-8, it's fine, doesn't?. > >>> > I'm afraid to reinstall everything from ports and start to get a > >>> > lot 64-32 bits incompatible issues like happened before =/ > >>> > >>> I think that should be fine with a utf-8 DB. > >>> Are you sure your tables are UTF-8 ? > >>> What database are you using ? mysql ? postgres ? I had no issue > with > >>> both and I have a couple of non pure ascii sites. > >>> However, when I moved to snow leopard, I recompiled mysql/postgres > >>> and the python drivers. > >>> > >>> Regards, > >>> Xavier. > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > >>> Groups "Django users" group. > >>> To post to this group, send email to django-users@googlegroups.com > . > >>> To unsubscribe from this group, send email to > >>> django-users+unsubsc
Re: Django on Mac OS X
2010/8/9 Daniel França : > I tried to reinstall everything... installing python+postgres from ports > and I get the Symbol not found: _PQbackendPID error again from psycopg. > I guess the best solution is run Ubuntu on a virtual machine or my project > will be stuck forever. > python+psycopg on mac just sux. I haven't really been following this thread, but you meant psycopg2, not psycopg right? psycopg is old and unsupported as far as I know. > > 2010/8/8 Daniel França >> >> tried, nothing :( >> I'm getting crazy with Mac OS, I think I'll go back to Linux :S >> >> On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy >> wrote: >>> >>> It won't work by commenting the timezone field since it has been created >>> with a non null constraint on your db. >>> Have you tried to get_or_create the account with timezone and language >>> set to some value ? >>> Regards, >>> Xavier. >>> >>> Le 8 août 2010 à 04:09, Daniel França a écrit : >>> >>> More information. >>> here: >>> def create_account(sender, instance=None, **kwargs): >>> if instance is None: >>> return >>> account, created = Account.objects.get_or_create(user=instance) >>> post_save.connect(create_account, sender=User) >>> If I comment the post_save.connect, there's no exception =) but, of >>> course the code doesn't do what it should do. >>> So, I don't know why, but the error is in the connect... maybe because of >>> timezone attribute of user >>> anyone has any idea? >>> 2010/8/7 Daniel França Xavier, I think we are almost there :P because there's a timezone field in my account model: class Account(models.Model): user = models.ForeignKey(User, unique=True, verbose_name=_('user')) timezone = TimeZoneField(_('timezone')) language = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) def __unicode__(self): return self.user.username I tried to comment the line, but then the create_user abort with an constraint timezone error. On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: > > And what's your Account model ? > I noticed it is in its get_or_create that you get the error. > Regards, > Xavier. > > Le 7 août 2010 à 18:52, Daniel França a écrit : > > Same error =/ > but now,I don't know why.. it's saving at the db. The error still > happens, but the data is in the database > > On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy > wrote: >> >> Sorry, I just woke up form a sleep :) >> I notice you get-or-create a user. >> However, did you try to call get or create with specifying the >> arguments ? first_name = "...", and so on ? >> Does it still give an error ? >> Regards, >> Xavier. >> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : >> >> I just googled your error and found: >> http://www.nerdydork.com/django-programmingerror-cant-adapt.html >> According to the first comment, you might do something wrong with the >> arguments types. >> Unless you give a table description (\d from psql shell) and the model >> I'm not sure I can help you further. >> Regards, >> Xavier. >> As the stack seems to have a >> Le 7 août 2010 à 17:21, Daniel França a écrit : >> >> I just created my db using django manage syncdb, I think it should >> create right. >> or how can I see the encode of each tables? >> I'm using postgresql 8.4 >> maybe I'll need reinstall everything =S >> >> On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy >> wrote: >>> >>> Le 7 août 2010 à 06:44, Daniel França a écrit : >>> >>> > My database is UTF-8, it's fine, doesn't?. >>> > I'm afraid to reinstall everything from ports and start to get a >>> > lot 64-32 bits incompatible issues like happened before =/ >>> >>> I think that should be fine with a utf-8 DB. >>> Are you sure your tables are UTF-8 ? >>> What database are you using ? mysql ? postgres ? I had no issue with >>> both and I have a couple of non pure ascii sites. >>> However, when I moved to snow leopard, I recompiled mysql/postgres >>> and the python drivers. >>> >>> Regards, >>> Xavier. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this g
Re: Django on Mac OS X
I tried to reinstall everything... installing python+postgres from ports and I get the Symbol not found: _PQbackendPID error again from psycopg. I guess the best solution is run Ubuntu on a virtual machine or my project will be stuck forever. python+psycopg on mac just sux. 2010/8/8 Daniel França > tried, nothing :( > I'm getting crazy with Mac OS, I think I'll go back to Linux :S > > > On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy wrote: > >> It won't work by commenting the timezone field since it has been created >> with a non null constraint on your db. >> Have you tried to get_or_create the account with timezone and language set >> to some value ? >> >> Regards, >> Xavier. >> >> Le 8 août 2010 à 04:09, Daniel França a écrit : >> >> More information. >> here: >> def create_account(sender, instance=None, **kwargs): >> if instance is None: >> return >> account, created = Account.objects.get_or_create(user=instance) >> >> post_save.connect(create_account, sender=User) >> >> If I comment the *post_save.connect*, there's no exception =) but, of >> course the code doesn't do what it should do. >> >> So, I don't know why, but the error is in the connect... maybe because of >> timezone attribute of user >> anyone has any idea? >> >> 2010/8/7 Daniel França >> >>> Xavier, I think we are almost there :P >>> because there's a timezone field in my account model: >>> >>> class Account(models.Model): >>> >>> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) >>> >>> timezone = TimeZoneField(_('timezone')) >>> language = models.CharField(_('language'), max_length=10, >>> choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) >>> >>> def __unicode__(self): >>> return self.user.username >>> >>> I tried to comment the line, but then the create_user abort with an >>> constraint timezone error. >>> >>> On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: >>> And what's your Account model ? I noticed it is in its get_or_create that you get the error. Regards, Xavier. Le 7 août 2010 à 18:52, Daniel França a écrit : Same error =/ but now,I don't know why.. it's saving at the db. The error still happens, but the data is in the database On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: > Sorry, I just woke up form a sleep :) > I notice you get-or-create a user. > However, did you try to call get or create with specifying the > arguments ? first_name = "...", and so on ? > Does it still give an error ? > > Regards, > Xavier. > > Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > > I just googled your error and found: > http://www.nerdydork.com/django-programmingerror-cant-adapt.html > According to the first comment, you might do something wrong with the > arguments types. > Unless you give a table description (\d from psql shell) and the model > I'm not sure I can help you further. > > Regards, > Xavier. > > As the stack seems to have a > > Le 7 août 2010 à 17:21, Daniel França a écrit : > > I just created my db using django manage syncdb, I think it should > create right. > or how can I see the encode of each tables? > I'm using postgresql 8.4 > maybe I'll need reinstall everything =S > > On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy > wrote: > >> >> Le 7 août 2010 à 06:44, Daniel França a écrit : >> >> > My database is UTF-8, it's fine, doesn't?. >> > I'm afraid to reinstall everything from ports and start to get a lot >> 64-32 bits incompatible issues like happened before =/ >> >> I think that should be fine with a utf-8 DB. >> Are you sure your tables are UTF-8 ? >> What database are you using ? mysql ? postgres ? I had no issue with >> both and I have a couple of non pure ascii sites. >> However, when I moved to snow leopard, I recompiled mysql/postgres and >> the python drivers. >> >> Regards, >> Xavier. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message bec
Re: Django on Mac OS X
tried, nothing :( I'm getting crazy with Mac OS, I think I'll go back to Linux :S On Sun, Aug 8, 2010 at 4:34 AM, Xavier Ordoquy wrote: > It won't work by commenting the timezone field since it has been created > with a non null constraint on your db. > Have you tried to get_or_create the account with timezone and language set > to some value ? > > Regards, > Xavier. > > Le 8 août 2010 à 04:09, Daniel França a écrit : > > More information. > here: > def create_account(sender, instance=None, **kwargs): > if instance is None: > return > account, created = Account.objects.get_or_create(user=instance) > > post_save.connect(create_account, sender=User) > > If I comment the *post_save.connect*, there's no exception =) but, of > course the code doesn't do what it should do. > > So, I don't know why, but the error is in the connect... maybe because of > timezone attribute of user > anyone has any idea? > > 2010/8/7 Daniel França > >> Xavier, I think we are almost there :P >> because there's a timezone field in my account model: >> >> class Account(models.Model): >> >> user = models.ForeignKey(User, unique=True, verbose_name=_('user')) >> >> timezone = TimeZoneField(_('timezone')) >> language = models.CharField(_('language'), max_length=10, >> choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) >> >> def __unicode__(self): >> return self.user.username >> >> I tried to comment the line, but then the create_user abort with an >> constraint timezone error. >> >> On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: >> >>> And what's your Account model ? >>> I noticed it is in its get_or_create that you get the error. >>> >>> Regards, >>> Xavier. >>> >>> Le 7 août 2010 à 18:52, Daniel França a écrit : >>> >>> Same error =/ >>> but now,I don't know why.. it's saving at the db. The error still >>> happens, but the data is in the database >>> >>> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: >>> Sorry, I just woke up form a sleep :) I notice you get-or-create a user. However, did you try to call get or create with specifying the arguments ? first_name = "...", and so on ? Does it still give an error ? Regards, Xavier. Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : I just googled your error and found: http://www.nerdydork.com/django-programmingerror-cant-adapt.html According to the first comment, you might do something wrong with the arguments types. Unless you give a table description (\d from psql shell) and the model I'm not sure I can help you further. Regards, Xavier. As the stack seems to have a Le 7 août 2010 à 17:21, Daniel França a écrit : I just created my db using django manage syncdb, I think it should create right. or how can I see the encode of each tables? I'm using postgresql 8.4 maybe I'll need reinstall everything =S On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: > > Le 7 août 2010 à 06:44, Daniel França a écrit : > > > My database is UTF-8, it's fine, doesn't?. > > I'm afraid to reinstall everything from ports and start to get a lot > 64-32 bits incompatible issues like happened before =/ > > I think that should be fine with a utf-8 DB. > Are you sure your tables are UTF-8 ? > What database are you using ? mysql ? postgres ? I had no issue with > both and I have a couple of non pure ascii sites. > However, when I moved to snow leopard, I recompiled mysql/postgres and > the python drivers. > > Regards, > Xavier. > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django us
Re: Django on Mac OS X
It won't work by commenting the timezone field since it has been created with a non null constraint on your db. Have you tried to get_or_create the account with timezone and language set to some value ? Regards, Xavier. Le 8 août 2010 à 04:09, Daniel França a écrit : > More information. > here: > def create_account(sender, instance=None, **kwargs): > if instance is None: > return > account, created = Account.objects.get_or_create(user=instance) > > post_save.connect(create_account, sender=User) > > If I comment the post_save.connect, there's no exception =) but, of course > the code doesn't do what it should do. > > So, I don't know why, but the error is in the connect... maybe because of > timezone attribute of user > anyone has any idea? > > 2010/8/7 Daniel França > Xavier, I think we are almost there :P > because there's a timezone field in my account model: > > class Account(models.Model): > > user = models.ForeignKey(User, unique=True, verbose_name=_('user')) > > timezone = TimeZoneField(_('timezone')) > language = models.CharField(_('language'), max_length=10, > choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) > > def __unicode__(self): > return self.user.username > > I tried to comment the line, but then the create_user abort with an > constraint timezone error. > > On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: > And what's your Account model ? > I noticed it is in its get_or_create that you get the error. > > Regards, > Xavier. > > Le 7 août 2010 à 18:52, Daniel França a écrit : > >> Same error =/ >> but now,I don't know why.. it's saving at the db. The error still happens, >> but the data is in the database >> >> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: >> Sorry, I just woke up form a sleep :) >> I notice you get-or-create a user. >> However, did you try to call get or create with specifying the arguments ? >> first_name = "...", and so on ? >> Does it still give an error ? >> >> Regards, >> Xavier. >> >> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : >> >>> I just googled your error and found: >>> http://www.nerdydork.com/django-programmingerror-cant-adapt.html >>> According to the first comment, you might do something wrong with the >>> arguments types. >>> Unless you give a table description (\d from psql shell) and the model I'm >>> not sure I can help you further. >>> >>> Regards, >>> Xavier. >>> >>> As the stack seems to have a >>> >>> Le 7 août 2010 à 17:21, Daniel França a écrit : >>> I just created my db using django manage syncdb, I think it should create right. or how can I see the encode of each tables? I'm using postgresql 8.4 maybe I'll need reinstall everything =S On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: Le 7 août 2010 à 06:44, Daniel França a écrit : > My database is UTF-8, it's fine, doesn't?. > I'm afraid to reinstall everything from ports and start to get a lot > 64-32 bits incompatible issues like happened before =/ I think that should be fine with a utf-8 DB. Are you sure your tables are UTF-8 ? What database are you using ? mysql ? postgres ? I had no issue with both and I have a couple of non pure ascii sites. However, when I moved to snow leopard, I recompiled mysql/postgres and the python drivers. Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at
Re: Django on Mac OS X
More information. here: def create_account(sender, instance=None, **kwargs): if instance is None: return account, created = Account.objects.get_or_create(user=instance) post_save.connect(create_account, sender=User) If I comment the *post_save.connect*, there's no exception =) but, of course the code doesn't do what it should do. So, I don't know why, but the error is in the connect... maybe because of timezone attribute of user anyone has any idea? 2010/8/7 Daniel França > Xavier, I think we are almost there :P > because there's a timezone field in my account model: > > class Account(models.Model): > > user = models.ForeignKey(User, unique=True, verbose_name=_('user')) > > timezone = TimeZoneField(_('timezone')) > language = models.CharField(_('language'), max_length=10, > choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) > > def __unicode__(self): > return self.user.username > > I tried to comment the line, but then the create_user abort with an > constraint timezone error. > > On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: > >> And what's your Account model ? >> I noticed it is in its get_or_create that you get the error. >> >> Regards, >> Xavier. >> >> Le 7 août 2010 à 18:52, Daniel França a écrit : >> >> Same error =/ >> but now,I don't know why.. it's saving at the db. The error still happens, >> but the data is in the database >> >> On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: >> >>> Sorry, I just woke up form a sleep :) >>> I notice you get-or-create a user. >>> However, did you try to call get or create with specifying the arguments >>> ? first_name = "...", and so on ? >>> Does it still give an error ? >>> >>> Regards, >>> Xavier. >>> >>> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : >>> >>> I just googled your error and found: >>> http://www.nerdydork.com/django-programmingerror-cant-adapt.html >>> According to the first comment, you might do something wrong with the >>> arguments types. >>> Unless you give a table description (\d from psql shell) and the model >>> I'm not sure I can help you further. >>> >>> Regards, >>> Xavier. >>> >>> As the stack seems to have a >>> >>> Le 7 août 2010 à 17:21, Daniel França a écrit : >>> >>> I just created my db using django manage syncdb, I think it should create >>> right. >>> or how can I see the encode of each tables? >>> I'm using postgresql 8.4 >>> maybe I'll need reinstall everything =S >>> >>> On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: >>> Le 7 août 2010 à 06:44, Daniel França a écrit : > My database is UTF-8, it's fine, doesn't?. > I'm afraid to reinstall everything from ports and start to get a lot 64-32 bits incompatible issues like happened before =/ I think that should be fine with a utf-8 DB. Are you sure your tables are UTF-8 ? What database are you using ? mysql ? postgres ? I had no issue with both and I have a couple of non pure ascii sites. However, when I moved to snow leopard, I recompiled mysql/postgres and the python drivers. Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/django-users?hl=en. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more
Re: Django on Mac OS X
Xavier, I think we are almost there :P because there's a timezone field in my account model: class Account(models.Model): user = models.ForeignKey(User, unique=True, verbose_name=_('user')) timezone = TimeZoneField(_('timezone')) language = models.CharField(_('language'), max_length=10, choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE) def __unicode__(self): return self.user.username I tried to comment the line, but then the create_user abort with an constraint timezone error. On Sat, Aug 7, 2010 at 2:22 PM, Xavier Ordoquy wrote: > And what's your Account model ? > I noticed it is in its get_or_create that you get the error. > > Regards, > Xavier. > > Le 7 août 2010 à 18:52, Daniel França a écrit : > > Same error =/ > but now,I don't know why.. it's saving at the db. The error still happens, > but the data is in the database > > On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: > >> Sorry, I just woke up form a sleep :) >> I notice you get-or-create a user. >> However, did you try to call get or create with specifying the arguments ? >> first_name = "...", and so on ? >> Does it still give an error ? >> >> Regards, >> Xavier. >> >> Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : >> >> I just googled your error and found: >> http://www.nerdydork.com/django-programmingerror-cant-adapt.html >> According to the first comment, you might do something wrong with the >> arguments types. >> Unless you give a table description (\d from psql shell) and the model I'm >> not sure I can help you further. >> >> Regards, >> Xavier. >> >> As the stack seems to have a >> >> Le 7 août 2010 à 17:21, Daniel França a écrit : >> >> I just created my db using django manage syncdb, I think it should create >> right. >> or how can I see the encode of each tables? >> I'm using postgresql 8.4 >> maybe I'll need reinstall everything =S >> >> On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: >> >>> >>> Le 7 août 2010 à 06:44, Daniel França a écrit : >>> >>> > My database is UTF-8, it's fine, doesn't?. >>> > I'm afraid to reinstall everything from ports and start to get a lot >>> 64-32 bits incompatible issues like happened before =/ >>> >>> I think that should be fine with a utf-8 DB. >>> Are you sure your tables are UTF-8 ? >>> What database are you using ? mysql ? postgres ? I had no issue with both >>> and I have a couple of non pure ascii sites. >>> However, when I moved to snow leopard, I recompiled mysql/postgres and >>> the python drivers. >>> >>> Regards, >>> Xavier. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from th
Re: Django on Mac OS X
And what's your Account model ? I noticed it is in its get_or_create that you get the error. Regards, Xavier. Le 7 août 2010 à 18:52, Daniel França a écrit : > Same error =/ > but now,I don't know why.. it's saving at the db. The error still happens, > but the data is in the database > > On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: > Sorry, I just woke up form a sleep :) > I notice you get-or-create a user. > However, did you try to call get or create with specifying the arguments ? > first_name = "...", and so on ? > Does it still give an error ? > > Regards, > Xavier. > > Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > >> I just googled your error and found: >> http://www.nerdydork.com/django-programmingerror-cant-adapt.html >> According to the first comment, you might do something wrong with the >> arguments types. >> Unless you give a table description (\d from psql shell) and the model I'm >> not sure I can help you further. >> >> Regards, >> Xavier. >> >> As the stack seems to have a >> >> Le 7 août 2010 à 17:21, Daniel França a écrit : >> >>> I just created my db using django manage syncdb, I think it should create >>> right. >>> or how can I see the encode of each tables? >>> I'm using postgresql 8.4 >>> maybe I'll need reinstall everything =S >>> >>> On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: >>> >>> Le 7 août 2010 à 06:44, Daniel França a écrit : >>> >>> > My database is UTF-8, it's fine, doesn't?. >>> > I'm afraid to reinstall everything from ports and start to get a lot >>> > 64-32 bits incompatible issues like happened before =/ >>> >>> I think that should be fine with a utf-8 DB. >>> Are you sure your tables are UTF-8 ? >>> What database are you using ? mysql ? postgres ? I had no issue with both >>> and I have a couple of non pure ascii sites. >>> However, when I moved to snow leopard, I recompiled mysql/postgres and the >>> python drivers. >>> >>> Regards, >>> Xavier. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
Same error =/ but now,I don't know why.. it's saving at the db. The error still happens, but the data is in the database On Sat, Aug 7, 2010 at 12:54 PM, Xavier Ordoquy wrote: > Sorry, I just woke up form a sleep :) > I notice you get-or-create a user. > However, did you try to call get or create with specifying the arguments ? > first_name = "...", and so on ? > Does it still give an error ? > > Regards, > Xavier. > > Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > > I just googled your error and found: > http://www.nerdydork.com/django-programmingerror-cant-adapt.html > According to the first comment, you might do something wrong with the > arguments types. > Unless you give a table description (\d from psql shell) and the model I'm > not sure I can help you further. > > Regards, > Xavier. > > As the stack seems to have a > > Le 7 août 2010 à 17:21, Daniel França a écrit : > > I just created my db using django manage syncdb, I think it should create > right. > or how can I see the encode of each tables? > I'm using postgresql 8.4 > maybe I'll need reinstall everything =S > > On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: > >> >> Le 7 août 2010 à 06:44, Daniel França a écrit : >> >> > My database is UTF-8, it's fine, doesn't?. >> > I'm afraid to reinstall everything from ports and start to get a lot >> 64-32 bits incompatible issues like happened before =/ >> >> I think that should be fine with a utf-8 DB. >> Are you sure your tables are UTF-8 ? >> What database are you using ? mysql ? postgres ? I had no issue with both >> and I have a couple of non pure ascii sites. >> However, when I moved to snow leopard, I recompiled mysql/postgres and the >> python drivers. >> >> Regards, >> Xavier. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
Sorry, I just woke up form a sleep :) I notice you get-or-create a user. However, did you try to call get or create with specifying the arguments ? first_name = "...", and so on ? Does it still give an error ? Regards, Xavier. Le 7 août 2010 à 17:46, Xavier Ordoquy a écrit : > I just googled your error and found: > http://www.nerdydork.com/django-programmingerror-cant-adapt.html > According to the first comment, you might do something wrong with the > arguments types. > Unless you give a table description (\d from psql shell) and the model I'm > not sure I can help you further. > > Regards, > Xavier. > > As the stack seems to have a > > Le 7 août 2010 à 17:21, Daniel França a écrit : > >> I just created my db using django manage syncdb, I think it should create >> right. >> or how can I see the encode of each tables? >> I'm using postgresql 8.4 >> maybe I'll need reinstall everything =S >> >> On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: >> >> Le 7 août 2010 à 06:44, Daniel França a écrit : >> >> > My database is UTF-8, it's fine, doesn't?. >> > I'm afraid to reinstall everything from ports and start to get a lot 64-32 >> > bits incompatible issues like happened before =/ >> >> I think that should be fine with a utf-8 DB. >> Are you sure your tables are UTF-8 ? >> What database are you using ? mysql ? postgres ? I had no issue with both >> and I have a couple of non pure ascii sites. >> However, when I moved to snow leopard, I recompiled mysql/postgres and the >> python drivers. >> >> Regards, >> Xavier. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
I just googled your error and found: http://www.nerdydork.com/django-programmingerror-cant-adapt.html According to the first comment, you might do something wrong with the arguments types. Unless you give a table description (\d from psql shell) and the model I'm not sure I can help you further. Regards, Xavier. As the stack seems to have a Le 7 août 2010 à 17:21, Daniel França a écrit : > I just created my db using django manage syncdb, I think it should create > right. > or how can I see the encode of each tables? > I'm using postgresql 8.4 > maybe I'll need reinstall everything =S > > On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: > > Le 7 août 2010 à 06:44, Daniel França a écrit : > > > My database is UTF-8, it's fine, doesn't?. > > I'm afraid to reinstall everything from ports and start to get a lot 64-32 > > bits incompatible issues like happened before =/ > > I think that should be fine with a utf-8 DB. > Are you sure your tables are UTF-8 ? > What database are you using ? mysql ? postgres ? I had no issue with both and > I have a couple of non pure ascii sites. > However, when I moved to snow leopard, I recompiled mysql/postgres and the > python drivers. > > Regards, > Xavier. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
I just created my db using django manage syncdb, I think it should create right. or how can I see the encode of each tables? I'm using postgresql 8.4 maybe I'll need reinstall everything =S On Sat, Aug 7, 2010 at 6:49 AM, Xavier Ordoquy wrote: > > Le 7 août 2010 à 06:44, Daniel França a écrit : > > > My database is UTF-8, it's fine, doesn't?. > > I'm afraid to reinstall everything from ports and start to get a lot > 64-32 bits incompatible issues like happened before =/ > > I think that should be fine with a utf-8 DB. > Are you sure your tables are UTF-8 ? > What database are you using ? mysql ? postgres ? I had no issue with both > and I have a couple of non pure ascii sites. > However, when I moved to snow leopard, I recompiled mysql/postgres and the > python drivers. > > Regards, > Xavier. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
Le 7 août 2010 à 06:44, Daniel França a écrit : > My database is UTF-8, it's fine, doesn't?. > I'm afraid to reinstall everything from ports and start to get a lot 64-32 > bits incompatible issues like happened before =/ I think that should be fine with a utf-8 DB. Are you sure your tables are UTF-8 ? What database are you using ? mysql ? postgres ? I had no issue with both and I have a couple of non pure ascii sites. However, when I moved to snow leopard, I recompiled mysql/postgres and the python drivers. Regards, Xavier. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
My database is UTF-8, it's fine, doesn't?. I'm afraid to reinstall everything from ports and start to get a lot 64-32 bits incompatible issues like happened before =/ 2010/8/6 Daniel França > ops, sorry. python 2.7 django 1.2.1 =} > thanx, I'll look at this > > > On Fri, Aug 6, 2010 at 1:02 PM, wrote: > >> Hi daniel, >> >> I doubt your python version is 1.2.1, maybe it's rather Django version :) >> However, the issue django stated looks pretty clear to me. You created a >> database with a wrong encoding type. >> You should have a look at: >> http://docs.djangoproject.com/en/1.2/ref/unicode/ >> >> Regards, >> Xavier. >> >> On Fri, 6 Aug 2010 11:13:40 -0300, Daniel França > > >> wrote: >> > Hi, I'm still get error trying to run my project on Mac =(Now the >> > standalone server is running fine, but when I try to create a new user I >> > get the error: "Can't adapt type 'US/Eastern", I tried to change my >> > TIME_ZONE in setting, but no success. I can simulate this error in >> > console, and here's the output: >> from django.contrib.auth.models import User >>> new_user = >> > User.objects.create_user("daniel", "daniel.fra...@gmail.com [1]", >> > "daniel") Traceback (most recent call last): File "", line 1, in >> > File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", >> > line 129, in create_user user.save(using=self._db) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", >> > line 435, in save self.save_base(using=using, >> > force_insert=force_insert, force_update=force_update) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", >> > line 543, in save_base created=(not record_exists), >> > raw=raw) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", >> > line 162, in send response = receiver(signal=self, sender=sender, >> > **named) File >> > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", >> > line 60, in create_account account, created = >> > Account.objects.get_or_create(user=instance) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", >> > line 135, in get_or_create return >> > self.get_query_set().get_or_create(**kwargs) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", >> > line 373, in get_or_create obj.save(force_insert=True, >> > using=self.db) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", >> > line 435, in save self.save_base(using=using, >> > force_insert=force_insert, force_update=force_update) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", >> > line 528, in save_base result = manager._insert(values, >> > return_id=update_pk, using=using) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", >> > line 195, in _insert return insert_query(self.model, values, >> > **kwargs) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", >> > line 1479, in insert_query return >> > query.get_compiler(using=using).execute_sql(return_id) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", >> > line 783, in execute_sql cursor = super(SQLInsertCompiler, >> > self).execute_sql(None) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", >> > line 727, in execute_sql cursor.execute(sql, params) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/util.py", >> > line 15, in execute return self.cursor.execute(sql, >> > params) File >> > >> >> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", >> > line 44, in execute return self.cursor.execute(query, >> > args)DatabaseError: can't adapt type 'US/Eastern' >> > Anyone have any ideia what it can be?my python version is 1.2.1 >> > >> > On Mon, Jul 19, 2010 at 9:01 AM, Shawn Milochik wrote: >> > Daniel, >> > Glad to help. If you're new to the Mac and have questions just let me >> > know. >> > Shawn >> > sh...@milochik.com [3] Google Chat: shawn.m...@gmail.com [4] >> > >> > 2010/7/19 Daniel França >> > thanks a lot, now it's working.. at least this part.=) >> > >> > On Sun, Jul 18, 2010 at 11:10 PM, Shawn Milochik wrote: >> > This is a known (and common) prob
Re: Django on Mac OS X
ops, sorry. python 2.7 django 1.2.1 =} thanx, I'll look at this On Fri, Aug 6, 2010 at 1:02 PM, wrote: > Hi daniel, > > I doubt your python version is 1.2.1, maybe it's rather Django version :) > However, the issue django stated looks pretty clear to me. You created a > database with a wrong encoding type. > You should have a look at: > http://docs.djangoproject.com/en/1.2/ref/unicode/ > > Regards, > Xavier. > > On Fri, 6 Aug 2010 11:13:40 -0300, Daniel França > wrote: > > Hi, I'm still get error trying to run my project on Mac =(Now the > > standalone server is running fine, but when I try to create a new user I > > get the error: "Can't adapt type 'US/Eastern", I tried to change my > > TIME_ZONE in setting, but no success. I can simulate this error in > > console, and here's the output: > from django.contrib.auth.models import User >>> new_user = > > User.objects.create_user("daniel", "daniel.fra...@gmail.com [1]", > > "daniel") Traceback (most recent call last): File "", line 1, in > > File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > > line 129, in create_user user.save(using=self._db) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 435, in save self.save_base(using=using, > > force_insert=force_insert, force_update=force_update) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 543, in save_base created=(not record_exists), > > raw=raw) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > > line 162, in send response = receiver(signal=self, sender=sender, > > **named) File > > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > > line 60, in create_account account, created = > > Account.objects.get_or_create(user=instance) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > > line 135, in get_or_create return > > self.get_query_set().get_or_create(**kwargs) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > > line 373, in get_or_create obj.save(force_insert=True, > > using=self.db) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 435, in save self.save_base(using=using, > > force_insert=force_insert, force_update=force_update) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > > line 528, in save_base result = manager._insert(values, > > return_id=update_pk, using=using) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > > line 195, in _insert return insert_query(self.model, values, > > **kwargs) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > > line 1479, in insert_query return > > query.get_compiler(using=using).execute_sql(return_id) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", > > line 783, in execute_sql cursor = super(SQLInsertCompiler, > > self).execute_sql(None) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", > > line 727, in execute_sql cursor.execute(sql, params) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/util.py", > > line 15, in execute return self.cursor.execute(sql, > > params) File > > > > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", > > line 44, in execute return self.cursor.execute(query, > > args)DatabaseError: can't adapt type 'US/Eastern' > > Anyone have any ideia what it can be?my python version is 1.2.1 > > > > On Mon, Jul 19, 2010 at 9:01 AM, Shawn Milochik wrote: > > Daniel, > > Glad to help. If you're new to the Mac and have questions just let me > > know. > > Shawn > > sh...@milochik.com [3] Google Chat: shawn.m...@gmail.com [4] > > > > 2010/7/19 Daniel França > > thanks a lot, now it's working.. at least this part.=) > > > > On Sun, Jul 18, 2010 at 11:10 PM, Shawn Milochik wrote: > > This is a known (and common) problem. Here's an easy fix that I've used > > many times. > > > > http://shawnmilo.blogspot.com/2009/11/psycopg2-on-snow-leopard.html [7] > > > > Incidentally, you can replace "make install" with "make altinstall" to > > add Python 2.7 to your system without replacing the default Python. > > > > Shawn > > > > -
Re: Django on Mac OS X
Hi daniel, I doubt your python version is 1.2.1, maybe it's rather Django version :) However, the issue django stated looks pretty clear to me. You created a database with a wrong encoding type. You should have a look at: http://docs.djangoproject.com/en/1.2/ref/unicode/ Regards, Xavier. On Fri, 6 Aug 2010 11:13:40 -0300, Daniel França wrote: > Hi, I'm still get error trying to run my project on Mac =(Now the > standalone server is running fine, but when I try to create a new user I > get the error: "Can't adapt type 'US/Eastern", I tried to change my > TIME_ZONE in setting, but no success. I can simulate this error in > console, and here's the output: from django.contrib.auth.models import User >>> new_user = > User.objects.create_user("daniel", "daniel.fra...@gmail.com [1]", > "daniel") Traceback (most recent call last): File "", line 1, in > File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", > line 129, in create_user user.save(using=self._db) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 435, in save self.save_base(using=using, > force_insert=force_insert, force_update=force_update) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 543, in save_base created=(not record_exists), > raw=raw) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", > line 162, in send response = receiver(signal=self, sender=sender, > **named) File > "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", > line 60, in create_account account, created = > Account.objects.get_or_create(user=instance) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > line 135, in get_or_create return > self.get_query_set().get_or_create(**kwargs) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > line 373, in get_or_create obj.save(force_insert=True, > using=self.db) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 435, in save self.save_base(using=using, > force_insert=force_insert, force_update=force_update) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", > line 528, in save_base result = manager._insert(values, > return_id=update_pk, using=using) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", > line 195, in _insert return insert_query(self.model, values, > **kwargs) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", > line 1479, in insert_query return > query.get_compiler(using=using).execute_sql(return_id) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", > line 783, in execute_sql cursor = super(SQLInsertCompiler, > self).execute_sql(None) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", > line 727, in execute_sql cursor.execute(sql, params) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/util.py", > line 15, in execute return self.cursor.execute(sql, > params) File > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", > line 44, in execute return self.cursor.execute(query, > args)DatabaseError: can't adapt type 'US/Eastern' > Anyone have any ideia what it can be?my python version is 1.2.1 > > On Mon, Jul 19, 2010 at 9:01 AM, Shawn Milochik wrote: > Daniel, > Glad to help. If you're new to the Mac and have questions just let me > know. > Shawn > sh...@milochik.com [3] Google Chat: shawn.m...@gmail.com [4] > > 2010/7/19 Daniel França > thanks a lot, now it's working.. at least this part.=) > > On Sun, Jul 18, 2010 at 11:10 PM, Shawn Milochik wrote: > This is a known (and common) problem. Here's an easy fix that I've used > many times. > > http://shawnmilo.blogspot.com/2009/11/psycopg2-on-snow-leopard.html [7] > > Incidentally, you can replace "make install" with "make altinstall" to > add Python 2.7 to your system without replacing the default Python. > > Shawn > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this group, send email to django-users@googlegroups.com [8]. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com [9]. > For more options, visit this group at > http://
Re: Django on Mac OS X
Hi, I'm still get error trying to run my project on Mac =( Now the standalone server is running fine, but when I try to create a new user I get the error: "Can't adapt type 'US/Eastern", I tried to change my TIME_ZONE in setting, but no success. I can simulate this error in console, and here's the output: >>> from django.contrib.auth.models import User >>> new_user = User.objects.create_user("daniel", "daniel.fra...@gmail.com", "daniel") Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py", line 129, in create_user user.save(using=self._db) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 435, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 543, in save_base created=(not record_exists), raw=raw) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 162, in send response = receiver(signal=self, sender=sender, **named) File "/Users/danielfranca/workspace/django/view/tint/apps/account/models.py", line 60, in create_account account, created = Account.objects.get_or_create(user=instance) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", line 135, in get_or_create return self.get_query_set().get_or_create(**kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 373, in get_or_create obj.save(force_insert=True, using=self.db) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 435, in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/base.py", line 528, in save_base result = manager._insert(values, return_id=update_pk, using=using) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/manager.py", line 195, in _insert return insert_query(self.model, values, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/query.py", line 1479, in insert_query return query.get_compiler(using=using).execute_sql(return_id) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 783, in execute_sql cursor = super(SQLInsertCompiler, self).execute_sql(None) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 727, in execute_sql cursor.execute(sql, params) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/util.py", line 15, in execute return self.cursor.execute(sql, params) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute return self.cursor.execute(query, args) DatabaseError: can't adapt type 'US/Eastern' Anyone have any ideia what it can be? my python version is 1.2.1 On Mon, Jul 19, 2010 at 9:01 AM, Shawn Milochik wrote: > Daniel, > > Glad to help. If you're new to the Mac and have questions just let me know. > > Shawn > > sh...@milochik.com > Google Chat: shawn.m...@gmail.com > > 2010/7/19 Daniel França > >> thanks a lot, now it's working.. at least this part. >> =) >> >> On Sun, Jul 18, 2010 at 11:10 PM, Shawn Milochik wrote: >> >>> This is a known (and common) problem. Here's an easy fix that I've used >>> many times. >>> >>> http://shawnmilo.blogspot.com/2009/11/psycopg2-on-snow-leopard.html >>> >>> Incidentally, you can replace "make install" with "make altinstall" to >>> add Python 2.7 to your system without replacing the default Python. >>> >>> Shawn >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Django users" group. >>> To post to this group, send email to django-us...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=e
Re: Django on Mac OS X
thanks a lot, now it's working.. at least this part. =) On Sun, Jul 18, 2010 at 11:10 PM, Shawn Milochik wrote: > This is a known (and common) problem. Here's an easy fix that I've used > many times. > > http://shawnmilo.blogspot.com/2009/11/psycopg2-on-snow-leopard.html > > Incidentally, you can replace "make install" with "make altinstall" to add > Python 2.7 to your system without replacing the default Python. > > Shawn > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django on Mac OS X
This is a known (and common) problem. Here's an easy fix that I've used many times. http://shawnmilo.blogspot.com/2009/11/psycopg2-on-snow-leopard.html Incidentally, you can replace "make install" with "make altinstall" to add Python 2.7 to your system without replacing the default Python. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django on Mac OS X
Recently I migrated from Linux to Mac OS X 10.6, and I was thinking that would be easy to migrate my Django project to that. I was wrong, a lot wrong... First I tried to install Python2.7, the libs I need to my project, etc After that I get the error: *gresql_psycopg2/base.py", line 24, in * *raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)* *django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Symbol not found: _PQbackendPID* * Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so * * Expected in: flat namespace* * in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so * * * After some research I saw some suggestions, one of them was to download and install everything from Ports. But it didn't work for me too: :info:configure configure: error: library 'xml2' (version >= 2.6.23) is required for XML support :info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_postgresql84/work/postgresql-8.4.4" && ./configure --prefix=/opt/local --disable-dependency-tracking --sysconfdir=/opt/local/etc/postgresql84 --bindir=/opt/local/lib/postgresql84/bin --libdir=/opt/local/lib/postgresql84 --includedir=/opt/local/include/postgresql84 --datadir=/opt/local/share/postgresql84 --mandir=/opt/local/share/man --without-docdir --with-includes=/opt/local/include --with-libraries=/opt/local/lib --with-openssl --with-bonjour --with-readline --with-zlib --with-libxml --with-libxslt --enable-thread-safety --enable-integer-datetimes --with-ossp-uuid " returned error 1 :error:configure Target org.macports.configure returned: configure failure: shell command failed But libxml2.7 was there, what I did? I tried to remove it and install again, but when I tried to reinstall it I get another error: Error: You cannot install libxml2 for the architecture(s) x86_64 i386 because Error: its dependency libiconv only contains the architecture(s) i386 ppc. I tried install psycopg2 using easy_install... everything looks fine, but when I try to run my project, same error before. Another suggestion I found was to run python in 32 bits mode. I did a little test: "arch -i386 pyhon -c 'import psycopg2' It seems to work, but when I ran my project the error is still there, tried to change de env variable: defaults write com.apple.versioner.python Prefer-32-Bit -bool yes no success yet. So I gave up of Python2.7 and back to Python2.5 tried to install everything again. and it's not even recognize Django: Traceback (most recent call last): File "./manage.py", line 11, in from django.conf import settings ImportError: No module named django.conf The libs are here: python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages ls /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages Django-1.2.1-py2.5.egg-info django_extensions-0.5-py2.5.egg-info psycopg2 PIL django_pagination-1.0.7-py2.5.egg psycopg2-2.2.2-py2.5.egg-info PIL.pth django_robots-0.8.0-py2.5.egg pytz-2010h-py2.5.egg South-0.7.1-py2.5.egg django_tagging-0.3.1-py2.5.egg-info setuptools-0.6c11-py2.5.egg django django_timezones-0.1.4-py2.5.egg setuptools.pth django_db_log-2.0.0-py2.5.egg easy-install.pth tagging django_dbtemplates-0.7.1-py2.5.egg include_server django_extensions include_server-3.1_toolwhip.1-py2.5.egg-info python --version Python 2.5.4 Best Regards, Daniel França -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.