Monday, September 30, 2019

‘NoneType’ object has no attribute ‘__dict__’

Hamza and I did more research for advancing with #3095.

We had this traceback:

Traceback (most recent call last):
File "/usr/local/lino/lino_local/prod/env/src/appy/appy/pod/", line 845, in <module>
File "/usr/local/lino/lino_local/prod/env/src/appy/appy/pod/", line 833, in runoptions.pageStart, options.verbose)
File "/usr/local/lino/lino_local/prod/env/src/appy/appy/pod/", line 268, in __init__
self.docUrl, self.docPath = self.getFilePath(docPath)
File "/usr/local/lino/lino_local/prod/env/src/appy/appy/pod/", line 361, in getFilePath
import unohelper
File "/usr/lib/python3/dist-packages/", line 19, in <module>
import uno
File "/usr/local/lib/python3.7/dist-packages/uno/", line 4, in <module>
from base import Element, Css, Payload, UnoBaseFeature, UnoBaseField
ModuleNotFoundError: No module named 'base'

This was caused because we had installed uno via “sudo pip3 install uno”. But after saying “sudo pip3 uninstall uno” we are back at our initial problem:

AttributeError: 'NoneType' object has no attribute '__dict__'

We added a line import sys ; print(sys.path) to the and watched the difference: : ['/usr/local/lino',

Apache : ['/usr/local/lino',

IOW Apache takes some parts of the python path from /usr/lib/ where takes it from the virtualenv.

I asked google for apache python3 virtualenv, and on the following link I found the explanation:

Not python-path but python-home is the parameter for specifying which virtualenv mod_wsgi should use!

Some optimizations in Avanti

The three tables based on now have a new kind of summary view which displays them as a bullet list where each item includes the field names. This is used in avanti/Client/final_report.body.html. has a new optional keyword argument display_mode which can be used to ask a summary for a table that does not show as summary by default. This new option might make nosummary useless : instead of saying nosummary=True you can say display_mode=”grid” or display_mode=”html”. The display modes “grid” and “html” have the same result in a printed document or in a tested spec.