gaak99 / oxly

oxly auto-merges Dropbox file revisions with a git-like cli
MIT License
9 stars 1 forks source link

oxmerge err msg: close failed in file object destructor: #50

Closed gaak99 closed 6 years ago

gaak99 commented 6 years ago

So far I think it's minor/cosmetic.

oxmerge  dropbox://orgzly/misc-notes-spring18.org
oxly, version 0.10.11
Cloning dropbox://orgzly/misc-notes-spring18.org into /tmp/oxnote ...
Moving/saving old /tmp/oxnote/.oxly/.tmp to /tmp/oxnote/.oxly/.old/oxlytmp.26941 ... done.
Downloading metadata of 100 (max) latest revisions on Dropbox ... done.
Checking 2 latest revisions in Dropbox...
    downloading rev 57180446decd data ... done.
    downloading rev 57170446decd data ... done.
Downloading ancestor db ... done.
Checking ancestor rev data ...
    revision 562a0446decd already downloaded.
Viewing metadata latest 2 revisions (cached locally) ...
57180446decd    41691   2018-05-18 11:47:07 EDT-0400    8d71d932
57170446decd    43612   2018-05-18 11:46:37 EDT-0400    7b14bb9f
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
Viewing metadata least latest 2 revisions (cached locally) ...
55950446decd    9316    2018-05-03 12:00:13 EDT-0400    8b05fed9
55940446decd    9294    2018-05-03 11:59:50 EDT-0400    0d31c9db
Merging latest 2 revisions data ...
Conflicts found, pls run either ...
gaak99 commented 6 years ago

Here's output of bash -x of oxmerge

Downloading ancestor db ... done.
Checking ancestor rev data ...
    downloading rev 59f80446decd data ... done.
+ echo 'Viewing metadata latest 2 revisions (cached locally) ...'
Viewing metadata latest 2 revisions (cached locally) ...
+ oxly log --oneline orgzly/misc-notes-summer18.org
+ head -2
5a8e0446decd    42408   2018-09-13 12:23:09 EDT-0400    06cbb43b
5a830446decd    49729   2018-09-08 09:11:14 EDT-0400    1d20a394
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
+ echo 'Viewing metadata least latest 2 revisions (cached locally) ...'
Viewing metadata least latest 2 revisions (cached locally) ...
+ tail -2
+ oxly log --oneline orgzly/misc-notes-summer18.org
598a0446decd    24376   2018-07-23 21:58:26 EDT-0400    baf92f5c
59860446decd    23970   2018-07-23 18:26:19 EDT-0400    5d0aa9d8
gaak99 commented 6 years ago

We can reproduce it easy like so

oxly log --oneline orgzly/misc-notes-summer18.org|head -1
5a8e0446decd    42408   2018-09-13 12:23:09 EDT-0400    06cbb43b
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
gaak99 commented 6 years ago

Looks like it's a well known problem

https://stackoverflow.com/questions/12790328/how-to-silence-sys-excepthook-is-missing-error

@DavidZ the most obvious place in which this comes up is if output is pipped to head, a very common use-case if you wish to check the output before redirecting to a file. – Ian Sudbery Nov 3 '15 at 10:28

Looks like no quick fix at Python/bash script level /sad.

But probably can write a log file grokker in oxly that only outputs the num of lines requested (rather than |head).