eet-energy / solmate-sdk

All you need to integrate your EET SolMate into your home automation system
MIT License
18 stars 1 forks source link

Exception when creating directory for credentials file on Windows machine #5

Open hajanjes opened 7 months ago

hajanjes commented 7 months ago

Running the quickstart() (module apiclient.py) on a Windows machine raises an exception when creating the directory for the credentials file. Solution: Add "parents=True" keyword to mkdir() to allow Windows to create all missing parents in the path.

This doesn't work on Windows machines

_... CONFIG_DIRECTORY.mkdir(existok=True) ... FileNotFoundError: [WinError 3] Das System kann den angegebenen Pfad nicht finden: 'C:\Users\anyuser\.config\solmate-sdk'

This works on Windows machines as well

_... CONFIG_DIRECTORY.mkdir(parents=True, existok=True) ...