Saturday, May 5, 2018

I have at least 3 projects with paying customers waiting for progress. And instead of working on these projects I worked during a full week on the “Get the Lino projects to pass on Travis” site, a background job for which no customer will pay a cent because it doesn’t give them any tangible result. I’d fully agree if somebody who follows my activities would tell me that I am crazy…

But also today I continued with this. Because now it’s almost done, and now I want to have it done.

AttributeError: ‘bool’ object has no attribute ‘model’

The Lino Welfare project on Travis CI is still failing in Python 3. Here is one traceback:

$ doctest docs/specs/dumps.rst
File "/work/book/docs/specs/dumps.rst", line 88, in dumps.rst
Failed example:
    shell("python dump2py tmp/a --overwrite")
    #doctest: +ELLIPSIS
    Writing .../lino_book/projects/dumps/tmp/a/
    Wrote 3 objects to .../lino_book/projects/dumps/tmp/a/ and siblings.
    Writing /work/book/lino_book/projects/dumps/tmp/a/
    Traceback (most recent call last):
      File "", line 7, in <module>
      File "/python2.7/site-packages/django/core/management/", line 364, in execute_from_command_line
      File "/python2.7/site-packages/django/core/management/", line 356, in execute
      File "/python2.7/site-packages/django/core/management/", line 283, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/python2.7/site-packages/django/core/management/", line 330, in execute
        output = self.handle(*args, **options)
      File "/work/lino/lino/management/commands/", line 529, in handle
      File "/work/lino/lino/management/commands/", line 296, in write_files
        self.models = self.sort_models(self.models)
      File "/work/lino/lino/management/commands/", line 422, in sort_models
        if f.remote_field is not None and f.remote_field.model is not model and f.remote_field.model in unsorted])
    AttributeError: 'bool' object has no attribute 'model'
1 items had failures:
  10 of  20 in dumps.rst
***Test Failed*** 10 failures.
>>> from lino import startup
>>> startup('lino_book.projects.belref.settings.doctests')
>>> from lino.core.utils import sorted_models_list
>>> for model in sorted_models_list():
...     for f in model._meta.fields:
...         print(f.remote_field, f)

‘Partner’ object has no attribute ‘partner_ptr_id’