Cherrytree: [Windows] Must run as administrator in order to log errors

Created on 28 Apr 2016  ·  10Comments  ·  Source: giuspen/cherrytree

When there's a problem on Windows Cherrytree seems to log to C:\Program Files (x86)\CherryTree\bin\cherrytree.exe.log. This location is not writable when running Cherrytree under standard permissions causing an error message. It must be run as administrator in order to write the log there succesfully.

Would it be possible to change the location of the log to a location that is writeable under normal permissions? I think Microsoft have some standards around this, this stackoverflow.com answer might be relevant. C:\ProgramData\Cherrytree maybe?

I am running under Windows 10, if that is relevant.

bug win

All 10 comments

The error is controlled by py2exe (http://www.py2exe.org/) I'm not sure
that I can control the location of the error log (I believe it is the same
dir of the executable) but I will check

On 28 April 2016 at 14:08, Ian2020 [email protected] wrote:

When there's a problem on Windows Cherrytree seems to log to C:\Program
Files (x86)\CherryTree\bin\cherrytree.exe.log. This location is not
writable when running Cherrytree under standard permissions causing an
error message. It must be run as administrator in order to write the log
there succesfully.

Would it be possible to change the location of the log to a location that
is writeable under normal permissions? I think Microsoft have some
standards around this, this stackoverflow.com answer
http://stackoverflow.com/a/27181428 might be relevant.
C:\ProgramData\Cherrytree maybe?

I am running under Windows 10, if that is relevant.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/giuspen/cherrytree/issues/126

Thanks, if not I can raise raise the issue with them perhaps.

Taking those two sources together would it make sense to add something like:

import sys
sys.stderr = open(“[SOME FILE WRITEABLE BY USER]”, “w”)

...if running under Windows?

I had the same problems.
In Windows, with version 0.38.4 (Updated December 2017)

I get a message:
The logfile ‘C:\Program Files (x86)\CherryTree\bin\cherrytree.exe.log’ could not be opened:
Permission denied: ‘C:\Program Files (x86)\CherryTree\bin\cherrytree.exe.log’

It seams that CherryTree tray to write in some case in to the program folder "Program Files (x86)".
The message only shows up rarely (no reason to run as admin). It was impossible to finde the reason why CherryTree tray to write a log.
But it writes the log in to the wrong folder where no software should write. (i think...)

Bugfix suggestion, instead it should write in (where config.cfg is):
C:\Users\\AppData\Roaming\cherrytree\
then write it first in ctd folder, then temp folder, then in a selectable folder. If writing is not possible.
Additionally, show the log text in a selectable text field, so that the info is not lost.

This will be fixed in the gtkmm3 version, still need some months to have something usable

This happened to me today using the latest version of CherryTree ("The logfile '...\cherrytree.exe.log' could not be opened: [Errno 13] - Permission denied: '...\cherrytree.exe.log'").
It happened after Windows Defender "found" a "virus" in my cherry, now it is impossible to open it (maybe that is the cause)

you could try the development version that doesn't have this issue, https://www.giuspen.com/cherrytree/#downl scroll down for 0.99.3

Great! Thank you @giuspen

Closing, the issue is resolved for 0.99 version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

casainho picture casainho  ·  7Comments

valentinbesse picture valentinbesse  ·  8Comments

kharaktur picture kharaktur  ·  9Comments

HEDGHOK picture HEDGHOK  ·  6Comments

bhutch picture bhutch  ·  6Comments