3

I use the latest version of QGIS (2.8.2) in MAC and have se the default Python version 2.7. Moreover, I have installed all the required python modules and GDAL.

It was working before, but now, when I click on the "Browse" button in Vector-> Research tools->Vector Grid, it returns the following error (actually, it returns this error whenever I click on any "browse" button in QGIS):

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools/doVectorGrid.py", line 269, in outFile
    ( self.shapefileName, self.encoding ) = ftools_utils.saveDialog( self )
  File "/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools/ftools_utils.py", line 285, in saveDialog
    fileDialog = QgsEncodingFileDialog( parent, "Save output shapefile", dirName, filtering, encode )
TypeError: QgsEncodingFileDialog(QWidget parent=None, QString caption=QString(), QString directory=QString(), QString filter=QString(), QString encoding=QString()): argument 3 has unexpected type 'QPyNullVariant'

Python version: 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]

QGIS version: 2.8.2-Wien Wien,

Python path: ['/Users/dimitriosefthymiou/.qgis2/python/plugins/processing', '/Applications/QGIS.app/Contents/MacOS/../Resources/python', u'/Users/dimitriosefthymiou/.qgis2/python', u'/Users/dimitriosefthymiou/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7', '/Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Python/2.7/site-packages/matplotlib-override', '/Library/Frameworks/GDAL.framework/Versions/1.11/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/singledispatch-3.4.0.3-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site-packages/PIL', u'/Users/dimitriosefthymiou/.qgis2//python', '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools']

2
  • Did you ever resolve this? I am having the same trouble.
    – user67366
    Commented Feb 16, 2016 at 21:15
  • This is not an answer, please comment on the question instead.
    – raphael
    Commented Feb 16, 2016 at 21:25

1 Answer 1

2

The "browse" feature may have gotten "stuck" on an empty or illegal file path and name, perhaps involving a directory in the path.

Rather than use the browse button, try typing in a fully qualified file name, including the path. Start at the "beginning" with the top level device or "/" directory. If all works well, as you type you should receive file suggestions that you can use, almost as effectively as browse, to get to the directory where you want to save the file. Try giving it a new file name, rather than replacing an existing file, in order to eliminate any side effects.

If this works, try the browse again, and it may start working because it might then be starting from the current (valid) directory.

1
  • Thanks for your answer. I cannot enter the path manually. It does not allow me to click in the blank field. I deleted QGIS and re-installed all the components, but nothing...
    – Def
    Commented Jun 30, 2015 at 12:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.