3👍
Turns out it was my .gitignore file that was encoded in UTF-16 that was the problem. This seemed to stop Black from working in the whole directory. When I moved all of my files to another directory, I only moved the visible files (so not .gitignore), hence the unusual behaviour. Changing the .gitignore to UTF-8 solved the problem.
-3👍
I don’t even know what django is, but I had the same problem in a non-django program.
In that code fragment was the problem that now is fixed:
open(document.txt, mode= "r", encoding="utf8")
As you can see, the encoding it’s utf8, without the "-". I used that code to open documents and read it. I hope it’ll be useful!
- [Django]-Get method classname inside decorator at __init__ in python
- [Django]-How to pass args to a signal
- [Django]-Dynamic SEO-friendly URLs
- [Django]-Using django-taggit, is it possible to limit the tags to pre approved values?
- [Django]-How to deal with unstable data received from RFID reader?
Source:stackexchange.com