Corruption of the known_hosts file
There is a consistent corruption to the known_hosts file if you follow the next steps:
0) Start with an empty (or nonexistant) known_hosts file (the one at the ~/.config/tryton/3.9/ directory)
1) Open tryton (current 3.9)
2) Try to connect to one of your servers by using an url like "xxx.xxx.xxx.xxx :8000" (notice the space before the semicolon)
This entry will be added as is to the known_hosts file.
3) Close tryton
4) Try to open it again
At this point I get this traceback:
Traceback (most recent call last):
File "/home/karla/.virtualenvs/tryton3.9-py2/bin/tryton", line 6, in <module>
exec(compile(open(__file__).read(), __file__, 'exec'))
File ".../tryton-client-3.9/bin/tryton", line 45, in <module>
from tryton import client
File ".../tryton-client-3.9/tryton/client.py", line 24, in <module>
import tryton.common as common
File ".../tryton-client-3.9/tryton/common/__init__.py", line 3, in
from common import *
File ".../tryton-client-3.9/tryton/common/common.py", line 28, in <module>
import tryton.rpc as rpc
File ".../tryton-client-3.9/tryton/rpc.py", line 29, in <module>
_FINGERPRINTS = Fingerprints()
File ".../tryton-client-3.9/tryton/fingerprints.py", line 13, in __init__
self.load()
File ".../tryton-client-3.9/tryton/fingerprints.py", line 25, in load
self[host] = sha1
File ".../tryton-client-3.9/tryton/fingerprints.py", line 35, in __setitem__
assert len(value) == 59 # len of formated sha1
AssertionError
The only way to step over this error is to delete the wrong entry from the known_hosts.
As a side note, if you first connect to url without the extra space and then you connect to it with the extra space you can notice how both entries are added to the known_hosts. Then on step 4 you will get the traceback once, but somehow, before the error raises, tryton will remove the wrong line, so the next time you try to open it will work fine. (So it is important to do step 0 to reproduce correctly)
Hope it's clear enough :-)