'res.user' has no attribute 'check_'

I want to do the Tryton installation from an Ubuntu 18.04 to a Rapi. For this I thought about copying the path ‘modules’ and the extensions that are in the path ‘dist-packages’ and updating the ‘new’ modules with trytond-admin the list of installed modules.
With Raspi some things are different. Lxml for example causes some problems in the beginning. Then there were some other modules to install. Anyway, I was able to enter the password with the Tryton client for Mac and via the interface.
But that was it. At first I thought I had destroyed the database and deleted the passwords. But this was not the case. What can I do to remove this error message?

``Traceback (most recent call last):
  File "/trytond/res/user.py", line 677, in check_password
    return CRYPT_CONTEXT.verify_and_update(password, hash_)
  File "/passlib/context.py", line 2417, in verify_and_update
    record = self._get_or_identify_record(hash, scheme, category)
  File "/passlib/context.py", line 2026, in _get_or_identify_record
    return self._identify_record(hash, category)
  File "/passlib/context.py", line 1131, in identify_record
    raise ValueError("hash could not be identified")
ValueError: hash could not be identified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 108, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 48, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/protocols/dispatcher.py", line 65, in login
    database_name, user, parameters, context=context)
  File "/trytond/security.py", line 34, in login
    user_id = User.get_login(loginname, parameters)
  File "/trytond/res/user.py", line 636, in get_login
    user_id = func(login, parameters)
  File "/trytond/res/user.py", line 650, in _login_password
    valid, new_hash = cls.check_password(password, password_hash)
  File "/trytond/res/user.py", line 683, in check_password
    valid = getattr(cls, 'check_' + hash_method)(password, hash_)
AttributeError: type object 'res.user' has no attribute 'check_'

It looks like you are using a database setup on another system which has specific crypt context (e.g. with bcrypt) and that on the current system this crypt context is not present. So it fall back to the former hash format which fails also.

But the strange thing is that I already worked with the installation on the Raspi and now I wanted to spare myself the completely manual installation of the modules.
Meaning: That I could log in and work via the client.

Copying file between system is not a proper way to make installation, so I’m not surprised you got issues like missing dependencies.

Especially since I assume that it is irrelevant on which system I start the Python application. Python remains Python. Or not? I noticed differences in the file organization.
The error is quite trivial to fix. I have spoken to
pip3 install bcrypt
the correct module is installed. And lo and behold, I can name myself. My ‘forbidden’ error still exists.
How can I enable debugging logging? And to which file can I redirect this output.

You can activate logging in Tryton.

You can use the -v flag of trytond to increase it’s verbosity. Messages will be logged on the standard output of the console.

Note that the option is increamental, so each v adds a level of warning. Use trytond -vvv for debug level.

Good morning,
I’m still suffering from the same defect. So far I have activated all modules via the Tryton client. I haven’t made any company settings or set up another user yet. Is it possible that the message ‘forbidden’ appears for this reason?
I have enabled debugging and get the following output in the console:

8682 1932522592 [2020-02-18 07:40:41,354] INFO trytond.modules all modules loaded
8682 1932522592 [2020-02-18 07:40:41,412] INFO trytond.protocols.dispatcher <class 'trytond.pool.res.user'>.get_preferences(*(True, {'client': '1e54dcb8-6506-4652-956b-2211f915f32d'}), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:41,576] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:41] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:41,636] INFO trytond.protocols.dispatcher <class 'trytond.pool.res.user'>.get_preferences(*(True, {'client': '1e54dcb8-6506-4652-956b-2211f915f32d'}), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:41,648] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:41] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:41,680] INFO trytond.protocols.dispatcher <class 'trytond.pool.res.user'>.get_preferences(*(False, {'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []}), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:42,388] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:42,421] INFO trytond.protocols.dispatcher <class 'trytond.ir.model.Model'>.list_models(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:42,586] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1932522592 [2020-02-18 07:40:42,701] INFO trytond.protocols.dispatcher <class 'trytond.ir.ui.icon.Icon'>.list_icons(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1922036832 [2020-02-18 07:40:42,707] INFO trytond.protocols.dispatcher <class 'trytond.ir.model.Model'>.list_history(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1953494112 [2020-02-18 07:40:42,751] INFO trytond.protocols.dispatcher <class 'trytond.ir.ui.view.ViewSearch'>.get_search(*({'client': '1e54dcb8-6506-4652-956b-2211f915f32d', 'warehouse': None, 'employee': None, 'company': None, 'language': 'en', 'language_direction': 'ltr', 'groups': [4, 5, 1, 21, 19, 2, 20, 18, 3, 22, 23, 6, 12, 11, 13, 15, 14, 26, 25, 28, 27, 29, 16, 17, 24, 8, 7, 9, 10], 'roles': []},), **{}) from admin@192.168.188.20//tryton/
8682 1932522592 [2020-02-18 07:40:42,788] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1922036832 [2020-02-18 07:40:42,795] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1953494112 [2020-02-18 07:40:42,843] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:42] "POST /tryton/ HTTP/1.1" 200 -
8682 1953494112 [2020-02-18 07:40:43,073] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:43] "POST /tryton/ HTTP/1.1" 403 -
8682 1953494112 [2020-02-18 07:40:43,112] INFO werkzeug 192.168.188.20 - - [18/Feb/2020 07:40:43] "GET /images/tryton-error.svg HTTP/1.1" 200 -

Having double // here is definitely not normal.

I can’t fix this mistake. Sometimes extensive debugging is less meaningful than the normal output of the program. I suspect that the 'custom.js' responsible for the display is responsible for this error with the double '/’. 'method not allowed' is written in the status output.

I just checked it myself and have it also in my environment. So it’s something from Tryton itself, but it doesn’t influence the rest because for me it’s working.

A simple check if the web part is working is just putting an index.html into the directory which you specified in your trytond.conf. So look at your trytond.conf under the section web. Below an example:

[web]
listen = 192.168.1.10:8000
root = /home/tryton/testtryton/www

The root is the location where your index.html should go. Also check the permissions!

If the above works. you will see the content of your index.html. Now you can put all the Sao data into that location, check the permissions and try again.

To install Sao in a easy understandable way check Setup web client with Debian 10

My own Index.html is displayed without problems. But the error remains.
File and directory rights I have assigned root and 777.
The link:

http://kapouay.odns.fr/pub/tryton/sao-dependencies-5.0-12.tar.gz

is outdated. Do you have a current one? Actually I have installed sao correctly.

@semarie have to give a new link for the newer series.

So, you get a login prompt when you access Sao? If so, did you selected the right database? On the other hand, can you login with the GTK client? Can you get a working system with the GTK client and then try Sao again?

If that’s all working, but you can’t still login, another thing you can try is to create a new database with a different name. No idea if the name tryton as database name is a good one. It can be a reserved word inside Tryton itself.

Oh, yeah. I can access and work with the GTK-Client on Tryton. Now I can specify the database in the conf file. In the client and on the web page I also have the choice of which database I want to work with.
Now I know, what I already suspected, that behind the double ‘/’ as parameter is the selected database.

There is no restriction on the database name and Tryton is not a reserved work. We have several instalations working with tryton as database name, probably is one of the most used names :face_with_hand_over_mouth: