Tryton - Issues

 

Issue6098

Title [Errno 22] invalid mode ('w') or filename : 'C:\\Users\\nelghani\\AppData\\Roaming\\.config\\tryton\\4.2\\known_hosts'
Priority bug Status resolved
Superseder Nosy List ced, nelghani, reviewbot, roundup-bot
Type crash Components tryton
Assigned To ced Keywords review
Reviews 31111002
View: 31111002

Created on 2016-12-07.14:16:26 by nelghani, last changed by roundup-bot.

Files
File name Uploaded Type Edit Remove
TrytonError.bmp nelghani, 2016-12-07.14:16:26 image/bmp
known_hosts nelghani, 2016-12-13.14:35:39 text/plain
Messages
New changeset f6cfccd4c897 by C?dric Krier in branch 'default':
Avoid unnecessary write of known_hosts file
http://hg.tryton.org/tryton/rev/f6cfccd4c897
msg31934 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-02-15.00:09:09
As it seems the APPDATA on Windows is no very reliable, so I think it is better to minimize the number of time we write in this directory.
So review31111002 limits the write as much as possible.
New review31111002 at https://codereview.tryton.org/31111002/#ps1
msg31853 (view) Author: [hidden] (nelghani) Date: 2017-02-09.19:39:00
This bug occurs only with a client on windows 7

Tab swithing and tab_counter are ok when client is on windows XP ,windows 8, linux, mac OS
msg30699 (view) Author: [hidden] (nelghani) Date: 2016-12-13.14:35:39
The content of the known_hosts file is :

demo4.2.tryton.org:8000 

See attached file
msg30696 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-12-13.10:52:22
The error can happen when the fingerprints file is written which could happen when a new connection is created and that the fingerprint is different then the one already knows (or if it is unknown).

For me, there are two possibilities:
- the path is not accessible for some reason
- maybe a concurrent attempt to write on it generate such error on windows. In this case a solution will be to put a Lock.

Any way, it will be useful to have the content of the known_hosts file.
msg30694 (view) Author: [hidden] (nelghani) Date: 2016-12-13.10:17:41
I also noticed that "known_hosts" file is saved when ever I change tab from sales view.
msg30626 (view) Author: [hidden] (nelghani) Date: 2016-12-09.09:40:24
When the error occured, I've checked if all files under 'C:\\Users\\nelghani\\AppData\\Roaming\\.config\\tryton\\4.2\\   are still present. And they were.

I installed Tryton client on an other Win7 workstation. and got the same error.

Regards
msg30623 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2016-12-09.07:02:54
Could it be possible that you have a daemon that remove folders under %APPDATA% ?
msg30598 (view) Author: [hidden] (nelghani) Date: 2016-12-07.14:16:26
Switching between tabs of sales view returns most of the time the following error

[Errno 22] invalid mode ('w') or filename : 'C:\\Users\\nelghani\\AppData\\Roaming\\.config\\tryton\\4.2\\known_hosts'

Tryton Client v4.2 on Windows
Hostname : demo4.2.tryton.org

I did the same test from SAO and from a linux Tryton Client but all was OK.

It seems that it concerns only Winows client

Regards
History
Date User Action Args
2017-02-20 23:15:30roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg32079
2017-02-15 00:09:09cedsetstatus: chatting -> testing
assignedto: ced
component: + tryton
messages: + msg31934
2017-02-15 00:05:17reviewbotsetnosy: + reviewbot
messages: + msg31933
2017-02-15 00:05:16reviewbotsetreviews: 31111002
keyword: + review
2017-02-09 19:39:00nelghanisetmessages: + msg31853
2017-02-09 09:33:14nelghanisetstatus: need-eg -> chatting
2016-12-13 14:35:39nelghanisetfiles: + known_hosts
messages: + msg30699
2016-12-13 10:52:22cedsetstatus: chatting -> need-eg
messages: + msg30696
2016-12-13 10:17:41nelghanisetstatus: need-eg -> chatting
messages: + msg30694
2016-12-09 09:40:24nelghanisetmessages: + msg30626

Showing 10 items. Show all history (warning: this could be VERY long)