[pypy-dev] Django DateField default value and migrations fail

Sergey Kurdakov sergey.forum at gmail.com
Wed Aug 17 03:27:25 EDT 2016


Hi William,

here is my traceback in console

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/pypy2.7/dist-packages/django/core/management/__init__.py",
line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/pypy2.7/dist-packages/django/core/management/__init__.py",
line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/pypy2.7/dist-packages/django/core/management/base.py",
line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/pypy2.7/dist-packages/django/core/management/base.py",
line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/pypy2.7/dist-packages/django/core/
management/commands/makemigrations.py", line 150, in handle
    self.write_migration_files(changes)
  File "/usr/local/lib/pypy2.7/dist-packages/django/core/
management/commands/makemigrations.py", line 178, in write_migration_files
    migration_string = writer.as_string()
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 167, in as_string
    operation_string, operation_imports = OperationWriter(operation).
serialize()
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 124, in serialize
    _write(arg_name, arg_value)
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 76, in _write
    arg_string, arg_imports = MigrationWriter.serialize(item)
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 357, in serialize
    item_string, item_imports = cls.serialize(item)
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 433, in serialize
    return cls.serialize_deconstructed(path, args, kwargs)
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 318, in serialize_deconstructed
    arg_string, arg_imports = cls.serialize(arg)
  File "/usr/local/lib/pypy2.7/dist-packages/django/db/migrations/writer.py",
line 540, in serialize
    "topics/migrations/#migration-serializing" % (value, get_docs_version())
ValueError: Cannot serialize: <bound method type.today of <class
'datetime.date'>>



Regards
Sergey

On Wed, Aug 17, 2016 at 10:21 AM, William ML Leslie <
william.leslie.ttg at gmail.com> wrote:

> On 17 August 2016 at 16:50, Sergey Kurdakov <sergey.forum at gmail.com>
> wrote:
> >
> > still causes error of the kind:
> >
> > topics/migrations/#migration-serializing" % (value, get_docs_version())
> > ValueError: Cannot serialize: <bound method type.today of <class
> > 'datetime.date'
>
> Do you get a full traceback?  That would be much more useful for
> tracking down the problem.
>
> --
> William Leslie
>
> Notice:
> Likely much of this email is, by the nature of copyright, covered
> under copyright law.  You absolutely MAY reproduce any part of it in
> accordance with the copyright law of the nation you are reading this
> in.  Any attempt to DENY YOU THOSE RIGHTS would be illegal without
> prior contractual agreement.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20160817/34d638ef/attachment-0001.html>


More information about the pypy-dev mailing list