ettore-galli / thonny-black-formatter

Thonny plugin for black formatting (Thonny >= 4.x)
MIT License
2 stars 2 forks source link

black-formater-plugin only working once #2

Open ktrinko opened 1 year ago

ktrinko commented 1 year ago

I am using Thonny 4.02 portable on Windows 10. After installing Black-formater-plugin, for the first time it works. Using Black a second time it says "Package not found". Restarting Thonny I can use Black again one more time, next time it again says "package not found" bild

ktrinko commented 1 year ago

Tested now on an other pc (windows 10) with thonny4.02 installed as standard app. It shows the same problem as the portable thonny

ettore-galli-dt commented 1 year ago

Sorry for the delay in answering

I am not able to reproduce the issue because I haven't a windows PC at hand...

As soon as I have time i'll inspect the code and try to guess where the problem could be...

ktrinko commented 1 year ago

Thank you for answering to my post! Kurt

ktrinko commented 1 year ago

I found a solution: Goto Tools > Manage Packages and install the package black (which was already installed by the thonny-black-formater-plugin) once more

etihwnad commented 4 months ago

For me (Thonny 4.1.4), this behavior remains.

(re)installing black, then restarting Thonny, will work exactly once.

Restart Thonny again, and it works the first time, but not thereafter.

I'll add more as (when/if) I poke deeper into what might be happening.