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 <module> 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.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/sqlite3/base.py", line 200, in execute return Database.Cursor.execute(self, query, params) sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type. I don't know if has something todo, but my Mac OSX is is english, and my timezone is São Paulo - Brazil. Daniel-Francas-MacBook-Pro:tint danielfranca$ python manage.py shell 2.7 (r27:82508, Jul 3 2010, 20:17:05) [GCC 4.0.1 (Apple Inc. build 5493)] Python 2.7 (r27:82508, Jul 3 2010, 20:17:05) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from django.contrib.auth.models import User >>> new_user = create_user('teste','te...@gmail.com','teste') Traceback (most recent call last): File "<console>", line 1, in <module> NameError: name 'create_user' is not defined >>> new_user = User.objects.create_user('teste','te...@gmail.com','teste') Traceback (most recent call last): File "<console>", line 1, in <module> 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.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/sqlite3/base.py", line 200, in execute return Database.Cursor.execute(self, query, params) InterfaceError: Error binding parameter 0 - probably unsupported type. On Mon, Aug 9, 2010 at 10:53 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > 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 <lukaszbalcer...@gmail.com> 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 <xordo...@linovia.com> 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 <daniel.fra...@gmail.com> > >> > 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 <xordo...@linovia.com> > >> > 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 <daniel.fra...@gmail.com> > >> >> 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 <xordo...@linovia.com > > > >> >> 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-us...@googlegroups.com. > >> >>>>> To unsubscribe from this group, send email to > >> >>>>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > >> >>>>> For more options, visit this group > >> >>>>> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> >>>>> For more options, visit this group > >> >>>>> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> >>>> For more options, visit this group > >> >>>> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> >>> For more options, visit this group > >> >>> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> >>> For more options, visit this group > >> >>> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> >> For more options, visit this group > >> >> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> >> For more options, visit this group > >> >> athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> > For more options, visit this group > >> > athttp://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<django-users%2bunsubscr...@googlegroups.com> > . > >> > For more options, visit this group > >> > athttp://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<django-users%2bunsubscr...@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<django-users%2bunsubscr...@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.