Alexander-Miller / treemacs

GNU General Public License v3.0
2.12k stars 155 forks source link

Python traceback appearing randomly(?) in minibuffer #956

Closed montaropdf closed 2 years ago

montaropdf commented 2 years ago

Hello,

Since the last package update I perform, I see the following python traceback appearing in the minibuffer. I have not identified a pattern to reproduce the error.

[Treemacs] Update of node "/home/smals-re/repos/gcloudadm/src/gcloudadm/report/utils.py" failed with status "exited abnormally with code 1" and result
[Treemacs] "Traceback (most recent call last):
  File "/home/smals-re/.emacs.d/elpa/treemacs-20220622.801/treemacs-single-file-git-status.py", line 108, in <module>
    main()
  File "/home/smals-re/.emacs.d/elpa/treemacs-20220622.801/treemacs-single-file-git-status.py", line 76, in main
    elif (changed_proc.wait() == 0 and changed_proc.stdout.read1() != b''):
TypeError: read1() takes exactly one argument (0 given)"
Wrote /home/smals-re/.emacs.d/.bookmarks.~undo-tree~
Alexander-Miller commented 2 years ago

What python version are you on - specifically the value of treemacs-python-executable?

What's the output of python /treemacs-install-location/treemacs-single-file-git-status.py /your/file X?

What's the output if you change the script to use read() instead of read1()?

montaropdf commented 2 years ago

Sorry for the late reply.

I finally find a way to prevent those messages.

By default, it seams that python 3.6 is used on my system. So I forced emacs and treemacs to use python 3.8. Since then I don't see anymore those errors.

Variable modified to force the use of python 3.8. (setq treemacs-python-executable "/usr/bin/python3.8")