this line shouldn't use os.path.join it should be just:
```
dirname = view.window().folders()[0]
```