AttributeError: 'module' object has no attribute 'Sha'

89 views
Skip to first unread message

Yanchao Jia

unread,
Mar 7, 2017, 4:15:06 AM3/7/17
to tryton
Ubuntu16.04  trytond==4.0.2  Python2.7.12
Do you have the “sha” file in this directory? 

jiayc@z:/usr/local/lib/python2.7/dist-packages/trytond/model/fields$ neso   
/usr/local/lib/python2.7/dist-packages/trytond_nereid-4.0.1.1-py2.7.egg/nereid/session.py:4: DeprecationWarning: Use nereid.sessions instead
  warn(DeprecationWarning("Use nereid.sessions instead"))
Traceback (most recent call last):
  File "/usr/local/bin/neso", line 102, in <module>
    Pool.start()
[......]
    class NereidUser(ModelSQL, ModelView):
  File "/usr/local/lib/python2.7/dist-packages/trytond_nereid-4.0.1.1-py2.7.egg/trytond/modules/nereid/user.py", line 130, in NereidUser
    password = fields.Sha('Password')
AttributeError: 'module' object has no attribute 'Sha'

jiayc@z:/usr/local/lib/python2.7/dist-packages/trytond/model/fields$ ls
binary.py    dict.py       __init__.py    numeric.py    reference.py
binary.pyc   dict.pyc      __init__.pyc   numeric.pyc   reference.pyc
boolean.py   field.py      integer.py     one2many.py   selection.py
boolean.pyc  field.pyc     integer.pyc    one2many.pyc  selection.pyc
char.py      float.py      many2many.py   one2one.py    text.py
char.pyc     float.pyc     many2many.pyc  one2one.pyc   text.pyc
date.py      function.py   many2one.py    property.py
date.pyc     function.pyc  many2one.pyc   property.pyc


Sergi Almacellas Abellana

unread,
Mar 7, 2017, 4:43:03 AM3/7/17
to try...@googlegroups.com
El 07/03/17 a les 10:05, Yanchao Jia ha escrit:
> Ubuntu16.04 trytond==4.0.2 Python2.7.12
> Do you have the “sha” file in this directory?
>
> jiayc@z:/usr/local/lib/python2.7/dist-packages/trytond/model/fields$ neso
> /usr/local/lib/python2.7/dist-packages/trytond_nereid-4.0.1.1-py2.7.egg/nereid/session.py:4:
> DeprecationWarning: Use nereid.sessions instead
> warn(DeprecationWarning("Use nereid.sessions instead"))
> Traceback (most recent call last):
> File "/usr/local/bin/neso", line 102, in <module>
> Pool.start()
> [......]
> class NereidUser(ModelSQL, ModelView):
> File
> "/usr/local/lib/python2.7/dist-packages/trytond_nereid-4.0.1.1-py2.7.egg/trytond/modules/nereid/user.py",
> line 130, in NereidUser
> password = fields.Sha('Password')
> AttributeError: 'module' object has no attribute 'Sha'
Sha field is no more avaialble on version 4.0 of trytond [1]. You should
use the char field with the password widget now.

Indeed if you are a Nereid user, you should report it to it's bug tracker.

[1] https://bugs.tryton.org/issue3713

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Cédric Krier

unread,
Mar 7, 2017, 4:45:05 AM3/7/17
to tryton
On 2017-03-07 01:05, Yanchao Jia wrote:
> Ubuntu16.04 trytond==4.0.2 Python2.7.12
> Do you have the “sha” file in this directory?
>
> jiayc@z:/usr/local/lib/python2.7/dist-packages/trytond/model/fields$ neso
> /usr/local/lib/python2.7/dist-packages/trytond_nereid-4.0.1.1-py2.7.egg/nereid/session.py:4:
> DeprecationWarning: Use nereid.sessions instead
> warn(DeprecationWarning("Use nereid.sessions instead"))
> Traceback (most recent call last):
> File "/usr/local/bin/neso", line 102, in <module>
> Pool.start()
> [......]
> class NereidUser(ModelSQL, ModelView):
> File
> "/usr/local/lib/python2.7/dist-packages/trytond_nereid-4.0.1.1-py2.7.egg/trytond/modules/nereid/user.py",
> line 130, in NereidUser
> password = fields.Sha('Password')
> AttributeError: 'module' object has no attribute 'Sha'

This field has been removed since 3.2 see https://bugs.tryton.org/issue3713

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages