andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

python3 pyqt5 - QFileDialog.getSaveFileName returns a tuple #374

Closed dglent closed 8 years ago

dglent commented 8 years ago

Here: https://github.com/hlamer/enki/blob/master/enki/core/document.py#L375 and here: https://github.com/hlamer/enki/blob/master/enki/core/document.py#L390

the filedialog in pyqt5 returns a tuple Same as: https://github.com/hlamer/enki/blob/master/enki/plugins/workspace_actions.py#L102

Traceback (most recent call last): File "/usr/lib/python3.4/site-packages/enki/plugins/workspace_actions.py", line 171, in _onFileSaveAsTriggered core.workspace().currentDocument().saveFileAs() File "/usr/lib/python3.4/site-packages/enki/core/document.py", line 394, in saveFileAs self.setFilePath(path) File "/usr/lib/python3.4/site-packages/enki/core/document.py", line 308, in setFilePath self._fileWatcher.setPath(newPath) File "/usr/lib/python3.4/site-packages/enki/core/document.py", line 73, in setPath if path is not None and os.path.isfile(path): File "/usr/lib64/python3.4/genericpath.py", line 30, in isfile st = os.stat(path) TypeError: argument should be string, bytes or integer, not tuple

andreikop commented 8 years ago

Ooops. Wasn't found because I usually use Locator